Hi,

I have a huge Makefile with dozens of targets. I would like to be able to
run something (a script, shell command, another target) before *and* after
each target, that will gather basic data like when the target was started,
when it finished, how long it took, and other things. Now, of course I can
go in the Makefile, and modify each target to do what I want, but I'm
hoping there is an easier way.

It turns out that using MAKELEVEL allows me to run a something before each
toplevel target. Something like:

ifeq (0,$(MAKELEVEL))
  $(shell echo '*** pre make' 1>&2)
endif

is there something similar to run a shell command at the end of each target?

Thanks,
--Ala

_______________________________________________
help-gnu-utils mailing list
help-gnu-utils@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-utils

Reply via email to