%% Torsten Mohr <[EMAIL PROTECTED]> writes:

  tm> thanks for your hint.  It works, but can i also use $? in a
  tm> rule of the form:

  tm> $(OBJS_A) : %.o : %.c

Well, you of course CAN use it there, but this kind of rule won't do
what you want.

This rule tells how to build one .o from one .c, using one invocation of
the compiler.

If you want to build a bunch of .o's from a bunch of .c's, using a
single invocation of the compiler, then you have to write a rule that
expresses that: you can't have rules for each individual .o but rather
you must have a single rule for all of them.


The $? automatic variable, as you can read in the manual, expands to the
list of prerequisites that are newer than the target.  So, for a single
.o / single .c scenario, this isn't that useful, typically.

-- 
-------------------------------------------------------------------------------
 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://lists.gnu.org/mailman/listinfo/help-make

Reply via email to