address@hidden (Noel Yap) writes:
I have many files that are
generated and I care about the commands only when debugging.
In my build system I have $(call message) function that accepts
two arguments: first is what to print, second is what to execute:
%.o : %.cxx
$(call message,c++ $<,g++ -c $< -o $@)
But that's not all. There is also a variable called `verbose' which,
when defined, makes `message' print what it's actually executing. Very
handy when debugging.
target:
@complicated-command-to-create-target >$(@)
target:
$(call message,,complicated-command-to-create-target >$(@))
$ gmake --verbose
$ gmake verbose=1
-boris
_______________________________________________
Help-make mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/help-make