On 2010-08-25 19:35:27 (+0800), 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) $< > $...@.$$$$; \
Try with the -MP option, rather than the -M option.
>From the gcc man page:
-MP This option instructs CPP to add a phony target for each dependency
other than the main file, causing each to depend on nothing. These
dummy rules work around errors make gives if you remove header
files without updating the Makefile to match.
Regards,
Kristof
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make