From: stephan b. <st...@s1...> - 2005-03-04 01:23:35
|
Yo! i'm coding and needed a quick kludge to generate some make deps so i can generate some headers only if other code actually uses them. i wanted the make code to work both in toc makefiles and non-toc makefiles, so i had to find a portable way to clean up the temp deps file. i like the solution, shown on the last line: SS_DEPS = .sigslot.deps $(SS_DEPS): Makefile $(wildcard *.hpp *.cpp) @grep -le '# *include.*sigslot.hpp' *.?pp | \ sed -e 's/$$/: sigslot.generated.hpp/' \ > $@ include $(SS_DEPS) BOGO = $(shell rm $(SS_DEPS)) No more having to clean up deps files, assuming you use a deps generator which is fast enough (the one in the toc tree was taken from the linux source tree, and is FAST). -- ----- st...@s1... http://s11n.net "...pleasure is a grace and is not obedient to the commands of the will." -- Alan W. Watts |