[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Makefiles: run something before and after a target
From: |
Ala Qumsieh |
Subject: |
Makefiles: run something before and after a target |
Date: |
Wed, 03 May 2006 16:14:46 GMT |
User-agent: |
KNode/0.7.2 |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Makefiles: run something before and after a target,
Ala Qumsieh <=