[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNU Make enhansment patch - batching compiles
From: |
Eli Zaretskii |
Subject: |
Re: GNU Make enhansment patch - batching compiles |
Date: |
Thu, 03 May 2001 21:21:56 +0300 |
> From: "Jason Wessel" <address@hidden>
> 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 $@
- Re: GNU Make enhansment patch - batching compiles,
Eli Zaretskii <=