bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error in gnu make?


From: j
Subject: Re: Error in gnu make?
Date: 13 Mar 2002 11:24:55 -0800

Ok, I tried another way of doing what I need, and this time I really
think I have found a bug....  instead of the way I originally tried to
write the Makefile

        files=a.out b.out c.out

        ${files}: %.out : %/%.in

I changed the second % to a wildcard-

        files-a.out b.out c.out

        ${files}: % : %/*.in

(I never will have but one .out file in each subdirectory, so I could
do this).

But this did not work either!  It seems that when using the pattern
matching,the wildcard expansion turns off, the Makefile literally
looks for the file "a/*.out".  The message returned was

 make: *** No rule to make target `a.out/*.in', needed by `a.out'. 
Stop.

Note that the wildcard does work if I don't use a %....

        a.out: a/*.in

        b.out: b/*.in

        c.out: c/*.in

        This can not possible be a feature, not an error.  Comments?

                                                -J


address@hidden (Andreas Schwab) wrote in message news:<address@hidden>...
> "Paul D. Smith" <address@hidden> writes:
> 
> |> %% address@hidden (j) writes:
> |> 
> |>   j> Why did the writers of gnu make choose this convension?
> |> 
> |> I don't know, but it's been like that forever.  The only thing I can
> |> suggest is that a "pattern" is a well-defined concept in make, and it
> |> _always_ refers to a string (with no whitespace) containing either zero
> |> or one "%" character.
> |> 
> |> Perhaps the authors simply didn't want to make the prerequisite patterns
> |> inconsistent with all the other uses of patterns in GNU make, even
> |> though that would have been possible without ambiguity in this case.
> |> 
> |> 
> |> But, you'd have to ask RMS and/or Roland McGrath to be sure.
> 
> According to the manual, pattern rules have been invented before GNU make:
> 
>    * Pattern rules using `%'.  This has been implemented in several
>      versions of `make'.  We're not sure who invented it first, but
>      it's been spread around a bit.  *Note Defining and Redefining
>      Pattern Rules: Pattern Rules.
> 
> Andreas.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]