help-make
[Top][All Lists]
Advanced

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

Re: pattern rule prerequisites?


From: Paul D. Smith
Subject: Re: pattern rule prerequisites?
Date: Fri, 9 Aug 2002 00:07:26 -0400

%% Andre Merzky <address@hidden> writes:

  am> $(bins): % : .bins_%_objs.d
  am> include .bins_$*_objs.d
  am>               $(CC) -o $@ $<

  am> .bins_%_objs.d:
  am>               echo $*: $($*_objs) >> $@

  am> or

  am> $(bins): % : .bins_%_objs.d
  am>         include .bins_$*_objs.d
  am>               $(CC) -o $@ $<

  am> .bins_%_objs.d:
  am>               echo $*: $($*_objs) >> $@

Whoa; no offense but you're out in the weeds here :).

There's an example of using this method in the GNU make manual.  See the
section "Generating Prerequisites Automatically".

Note that while this is a reasonable description of using the method of
automatically remaking makefiles, the actual goal discussed in the
example (keeping track of .h files) is much better implemented with an
entirely different method; you can find info on that at my website
below.

-- 
-------------------------------------------------------------------------------
 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]