> From: "Jason Wessel" <[EMAIL PROTECTED]>
> Date: Thu, 3 May 2001 10:47:35 -0500
> 
> all: 1.o 2.o 3.o
> 1.o: 1.c
>         gcc -c $<
> 2.o: 2.c
>         gcc -c $<
> 3.o: 3.c
>         gcc -c $<
> 
> Now if I want to batch up all the files to compiler at once
> I try this to make use of the $?:
> all: 1.o 2.o 3.o
> 1.o 2.o 3.o: 1.c 2.c 3.c
>         gcc -c $?

No, this is definitely a bad idea: Make cannot cope well with a rule
which produces several targets.

The $? method is only good if you have a single target which gets
built from a list of files.  For example:

  last_compiled: 1.c 2.c 3.c
        gcc -c $?
        touch $@

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

Reply via email to