Thursday, 15 March 2012

makefile - make - Why are some pattern rules marked implicit? -


I am working on a header file dependency makefile, it is a small version of code:

  cdeps /% Mk ::% mkdir -p $ (@ D) ./cdeps.sh cdeps $ *. % .cpp.o:% .cpp cdeps /% cpp.mk g ++ -c $ & lt; -o $ @ -i $ include (shell search cdeps -type f 2> / dev / null)   

a.cpp contains b.cpp; Cdeps.sh adds dependencies to other cdeps /% .mk files included.

So when I make a CPO, first cdeps / a.cpp.mk is created, then a CPP .o (properly expected) then cdeps / a.cpp.mk has been removed Why?

You can read about indirect rules and when goals are removed, and how to stop it, here:

No comments:

Post a Comment