On 2012-05-17 14:50Z, Leo wrote: > I'm having an issue wherby changes to header files are not causing the cpp > files that depend on them to be rebuilt. I'm using gnu make auto > dependencies. Here is my build rule: > > *$(OUTPUTDIR)/%.o: %.cpp > $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c "$<" -MMD -MP -MF"$(@:%.o=%.d)" > -MT"$(@:%.o=%.d)" -o "$@" > *
'-MT' should be followed by the '.o' name, not the '.d' name. Instead of -MT"$(@:%.o=%.d)" try -MT $@ http://gcc.gnu.org/onlinedocs/cpp/Invocation.html | -MT target | Change the target of the rule emitted by dependency generation. | By default CPP takes the name of the main input file, deletes any | directory components and any file suffix such as `.c', and appends | the platform's usual object suffix. ... | For example, -MT '$(objpfx)foo.o' might give | $(objpfx)foo.o: foo.c _______________________________________________ Help-make mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-make
