[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dependency issue

From: Kristof Provost
Subject: Re: dependency issue
Date: Wed, 25 Aug 2010 16:47:24 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

On 2010-08-25 19:35:27 (+0800), Lynn Lin <address@hidden> wrote:
> All,
>    I use the following rules to generate dependency automatically
> %.P : %.cpp
>         $(QUIET_MM)rm -f $@; \
>         $(CPP) -M $(CPPFLAGS) $(CXXFLAGS) $(INCLUDES)  $< > address@hidden; \

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]