I\'m using a makefile to compile a program made of many .c
files, and any time make
is invoked it only compiles those files modified after the last run
Since I can't comment on the AT = $(AT_$(V))
suggestion, note that Automake does provide a standard macro that does the same thing as AT
, which is called AM_V_at
.
You will also find that it has another very useful AM_V_GEN
variable, that resolves either to nothing or to @echo " GEN " $@;
, depending on the verbosity.
This allows you to code something like this:
grldr.mbr: mbrstart
$(AM_V_GEN)
$(AM_V_at)-rm -f grldr.mbr
$(AM_V_at)cat mbrstart > grldr.mbr
The output of which will be either (verbosity disabled):
GEN grldr.mbr
or (verbosity enabled):
rm -f grldr.mbr
cat mbrstart > grldr.mbr
Pretty convenient, and this removes the need to define your own macros.