help-make
[Top][All Lists]
Advanced

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

Re: dependency issue


From: Lynn Lin
Subject: Re: dependency issue
Date: Wed, 25 Aug 2010 22:46:28 +0800

On Wed, Aug 25, 2010 at 7:35 PM, 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; \
>        sed -e 's,\($*\)\.o[ :]*,$@ \1.o : ,g' < address@hidden > $@; \
>        rm -f address@hidden
>
> 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
>
> address@hidden:~/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
>



reply via email to

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