%% Andre Merzky <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>          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

_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make

Reply via email to