help-make
[Top][All Lists]
Advanced

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

Re: how to suppress the included makefile not found warning?


From: Andre Majorel
Subject: Re: how to suppress the included makefile not found warning?
Date: Wed, 18 Feb 2004 11:02:01 +0100
User-agent: Mutt/1.5.4i

On 2004-02-17 23:50 -0500, Paul D. Smith wrote:
> %% Andre Majorel <address@hidden> writes:
> 
>   >> You have to use eval.
> 
>   am> Couldn't he write:
> 
>   am> define newline
> 
> 
>   am> endef
> 
>   am> $(foreach program,$(PROGRAMS),$(program): $($(program)_OBJ)$(newline))
> 
>   am> ?
> 
> No.  You can try it and see that it doesn't work.

Sorry. I learned that one minute after hitting [y]. :-)
 
> A single line of a makefile is interpreted to be a single line of a
> makefile, even if the expansion includes newlines.

Not for recipes, apparently:

all:
        $(foreach f,a b,echo $(f)1$(newline)echo $(f)2$(newline))

$ make all
echo a1
a1
echo a2
a2
echo b1
b1
echo b2
b2

Why it works for generating recipes and not for target-dependencies
lines, is a complete mystery to me.

-- 
André Majorel <address@hidden>
http://www.teaser.fr/~amajorel/




reply via email to

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