[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Nested make?
From: |
Paul Smith |
Subject: |
Re: Nested make? |
Date: |
Sun, 2 Jan 2005 20:40:43 -0500 |
%% "Nikos Balkanas" <address@hidden> writes:
> Hello,
Hi. Please send plain text email to the mailing list, rather than HTML
or Rich Text. Thanks!
> I have a small problem with make. I try to process differently the same
> = source files (%.c) using wildcards and a different argument to make =
> (make asm). The solution that I have is scripted and contrary to make =
> philosophy, inasmuch all the source files are remade not only the ones =
> changed since last time:
If you want all the files to be rebuilt every time, why use make at all?
Just write a shell script.
> %: %.c
> ${CC} ${CFLAGS} $< -o $@
> Instead I am looking for smt else (nested example - not working):
> asm: %: %.c
> ${CC} ${CFLAGS} -S -fverbose-asm $<
Well, you can either use ifeq () with the $(MAKECMDGOALS) variable, or,
if you have a sufficiently recent version of GNU make, you can use a
target-specific variable attached to the asm target:
asm: EXTRA_FLAGS = -S -fverbose-asm
asm: $(ASMSRC:%.c=%)
or similar.
See the GNU make manual for descriptions of both of these features.
--
-------------------------------------------------------------------------------
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
- Nested make?, Nikos Balkanas, 2005/01/02
- Re: Nested make?,
Paul Smith <=