help-make
[Top][All Lists]
Advanced

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

auto-dependency issues


From: Leo
Subject: auto-dependency issues
Date: Thu, 17 May 2012 10:50:10 -0400

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 "$@"
*

The dependency file is generated.  However, the debug output from make says
that the header file (EString.h) is NEWER than the target (though it lists
the dependency file - EString.d - as the target, but yet it still says that
the target does not need to be rebuilt).  And, the cpp file that I know
depends on it (EString.cpp) is listed as NOT needing to be rebuilt - and
this is listed before it indicates that the header file is NEWER.  Here is
the relevant section of the output:


  No implicit rule found for
`/home/encelium/svn/LTARM1/Sources/../build/build-debug-x86/strings/EString.d'.
   Considering target file `EString.cpp'.
    Looking for an implicit rule for `EString.cpp'.
    Trying pattern rule with stem `EString.cpp'.
    Trying implicit prerequisite `EString.cpp,v'.
    Trying pattern rule with stem `EString.cpp'.
    Trying implicit prerequisite `RCS/EString.cpp,v'.
    Trying pattern rule with stem `EString.cpp'.
    Trying implicit prerequisite `RCS/EString.cpp'.
    Trying pattern rule with stem `EString.cpp'.
    Trying implicit prerequisite `s.EString.cpp'.
    Trying pattern rule with stem `EString.cpp'.
    Trying implicit prerequisite `SCCS/s.EString.cpp'.
    No implicit rule found for `EString.cpp'.
    Finished prerequisites of target file `EString.cpp'.
*   No need to remake target `EString.cpp'.
*   Pruning file `EString.h'.
   Pruning file `/home/encelium/svn/LTARM1/Sources/memory/MemoryPool.h'.
   Pruning file `/home/encelium/svn/LTARM1/Sources/debug/DBC.h'.
   Pruning file
`/home/encelium/svn/LTARM1/Sources/datastructures/CharBuffer.h'.
   Pruning file `/home/encelium/svn/LTARM1/Sources/misc/Global.h'.
   Pruning file `/home/encelium/svn/LTARM1/Sources/misc/PackedEnum.h'.
   Pruning file `EStringFormatter.h'.
   Pruning file `/home/encelium/svn/LTARM1/Sources/third-party/trio/trio.h'.
   Pruning file
`/home/encelium/svn/LTARM1/Sources/third-party/trio/triop.h'.
   Pruning file
`/home/encelium/svn/LTARM1/Sources/third-party/trio/triodef.h'.
  Finished prerequisites of target file
`/home/encelium/svn/LTARM1/Sources/../build/build-debug-x86/strings/EString.d'.
  Prerequisite `EString.cpp' is older than target
`/home/encelium/svn/LTARM1/Sources/../build/build-debug-x86/strings/EString.d'.
*  Prerequisite `EString.h' is newer than target
`/home/encelium/svn/LTARM1/Sources/../build/build-debug-x86/strings/EString.d'.
*  Prerequisite `/home/encelium/svn/LTARM1/Sources/memory/MemoryPool.h' is
older than target
`/home/encelium/svn/LTARM1/Sources/../build/build-debug-x86/strings/EString.d'.
  Prerequisite `/home/encelium/svn/LTARM1/Sources/debug/DBC.h' is older
than target
`/home/encelium/svn/LTARM1/Sources/../build/build-debug-x86/strings/EString.d'.
  Prerequisite
`/home/encelium/svn/LTARM1/Sources/datastructures/CharBuffer.h' is older
than target
`/home/encelium/svn/LTARM1/Sources/../build/build-debug-x86/strings/EString.d'.
  Prerequisite `/home/encelium/svn/LTARM1/Sources/misc/Global.h' is older
than target
`/home/encelium/svn/LTARM1/Sources/../build/build-debug-x86/strings/EString.d'.
  Prerequisite `/home/encelium/svn/LTARM1/Sources/misc/PackedEnum.h' is
older than target
`/home/encelium/svn/LTARM1/Sources/../build/build-debug-x86/strings/EString.d'.
  Prerequisite `EStringFormatter.h' is older than target
`/home/encelium/svn/LTARM1/Sources/../build/build-debug-x86/strings/EString.d'.
  Prerequisite `/home/encelium/svn/LTARM1/Sources/third-party/trio/trio.h'
is older than target
`/home/encelium/svn/LTARM1/Sources/../build/build-debug-x86/strings/EString.d'.
  Prerequisite `/home/encelium/svn/LTARM1/Sources/third-party/trio/triop.h'
is older than target
`/home/encelium/svn/LTARM1/Sources/../build/build-debug-x86/strings/EString.d'.
  Prerequisite
`/home/encelium/svn/LTARM1/Sources/third-party/trio/triodef.h' is older
than target
`/home/encelium/svn/LTARM1/Sources/../build/build-debug-x86/strings/EString.d'.
 No commands for
`/home/encelium/svn/LTARM1/Sources/../build/build-debug-x86/strings/EString.d'
and no prerequisites actually changed.
* No need to remake target
`/home/encelium/svn/LTARM1/Sources/../build/build-debug-x86/strings/EString.d'.
*
**
Thanks


reply via email to

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