help-make
[Top][All Lists]
Advanced

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

Re: Fun with auto generated dependencies & clean...


From: Rick Flower
Subject: Re: Fun with auto generated dependencies & clean...
Date: Thu, 19 Apr 2007 14:26:35 -0700
User-agent: Thunderbird 2.0.0.0 (Windows/20070326)

Rick Flower wrote:

ifneq ($(MAKECMDGOALS),clean)
-include $(SOURCES:.cc=.d)
endif

Ok.. I replaced the above with the following and it works better but the depends are not being properly used when clean is specified -- they're not part of the prerequisites for each file to be built as shown below :

ifneq (clean,$(findstring clean,$(MAKECMDGOALS)))
include $(SOURCES:.cc=.d)
endif

   Must remake target `file1.d'.
Putting child 0x0005e4b0 (file1.d) PID 13463 on the chain.
Live child 0x0005e4b0 (file1.d) PID 13463
Building depends...
Reaping winning child 0x0005e4b0 PID 13463
g++ -MM   [...] file1.cc | sed "/.*\.o:/ s%^[ ]*%\$(OBJDIR)/%" > file1.d
Live child 0x0005e4b0 (file1.d) PID 13464
Reaping winning child 0x0005e4b0 PID 13464
Removing child 0x0005e4b0 PID 13464 from chain.
   Successfully remade target file `file1.d'.
   Finished prerequisites of target file `../obj/file1.o'.
  Must remake target `../obj/file1.o'.
Putting child 0x0005e4b0 (../objfile1.o) PID 13469 on the chain.
Live child 0x0005e4b0 (../obj/file1.o) PID 13469
Prerequisites: file1.cc file1.d

I've trimmed a bit of the g++ command line to keep things short, but you can see in the last line of the above log that it was able to rebuild file1.d, but then the contents of file1.d were not added to the prerequisites for file1.o -- only the file1.d and the offending cc file are listed.. When it works properly, the rest of the crud in file1.d is also listed there.. Is there a way to force Make to re-examine the contents of that file again?




reply via email to

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