Hi Found a nifty way of comprehensively generating dependencies in make, in the O'Reilly Make book and am working on getting the following working from section 8.3.2:
http://www.makelinux.net/make3/make3-CHP-8-SECT-3.html # $(call make-depend,source-file,object-file,depend-file) define make-depend $(MAKEDEPEND) -f- $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $1 | \ $(SED) 's,^.*/\([^/]*\.o\) *:,$(dir $2)\1 $3: ,' > $3.tmp $(SED) -e 's/#.*//' \ -e 's/^[^:]*: *//' \ -e 's/ *\\$$$$//' \ -e '/^$$$$/ d' \ -e 's/$$$$/ :/' $3.tmp >> $3.tmp $(MV) $3.tmp $3 endef This raises the question, how much escaping does a $ need in a sed script in a make file(?!) I can't see the need for four of them, and it doesn't work (I think it should be two, and that does work) - am I missing something here or is this a typo? Cheers Tim -- Next meeting: Blandford Forum, Tuesday 2010-07-06 20:00 http://dorset.lug.org.uk/ http://www.linkedin.com/groups?gid=2645413 Chat: http://www.mibbit.com/?server=irc.blitzed.org&channel=%23dorset List info: https://mailman.lug.org.uk/mailman/listinfo/dorset