On Wed, Aug 25, 2010 at 7:35 PM, Lynn Lin <[email protected]> wrote: > All, > I use the following rules to generate dependency automatically > > %.P : %.cpp > $(QUIET_MM)rm -f $@; \ > $(CPP) -M $(CPPFLAGS) $(CXXFLAGS) $(INCLUDES) $< > $...@.$$$$; \ > sed -e 's,\($*\)\.o[ :]*,$@ \1.o : ,g' < $...@.$$$$ > $@; \ > rm -f $...@.$$$$ > > then include it > > When one dependency header file (it is written to .P file) is deleted > as it is not used,make doesn't work > > l...@linux01:~/demo$ ./make demo.o > make: *** No rule to make target `../../a.h', needed by `demo.o'. Stop. > I need to clean dependency file manually ,then compile ,everything is fine
this is easy to re-produce. > I guess make isn't happy when dependency is missing > > Thanks for your help in advance > > > Thanks > Lynn > _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
