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: Paul D. Smith
Subject: Re: how to suppress the included makefile not found warning?
Date: Wed, 11 Feb 2004 17:42:47 -0500

%% David Wuertele <address@hidden> writes:

  Noel> What about the possibly-not-so-obvious use of $(foreach) and $(eval)?

  dw> I tried $(foreach), but I was not able to make it generate a pattern.
  dw> I was doing something like this:

  dw>   $(foreach program,$(PROGRAMS),$(program): $($(program)_OBJ))

That's because this evaluates to one long line.  So, if PROGRAMS was
"foo bar" and foo_OBJ was foo.o and bar_OBJ was bar.o, this would
evaluate to, and be parsed by make as:

    foo: foo.o bar: bar.o


You have to use eval.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

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