I've been doing auto-dependencies (prerequisites) for more than a
decade...

This seems to solve a number of problems I've always had 
        1) the newest docs have the set -e, so failing compiles
        stop 
        2) I added a trap so stopping the make doesn't leave
                lots of half-baked files (off form *.d.<pid>).



%.d: %.cc
        set -e; [EMAIL PROTECTED]; trap 'retval=$$?; rm -f $$tmpfile;  exit 
$$retval' INT TERM EXIT; \
         $(CXX) -MM $(CXXFLAGS) $< > $$tmpfile; \
        sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $$tmpfile > $@;

k

Marty Leisner
[EMAIL PROTECTED]


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to