Don't include deps during 'make clean'.
authorRalph Giles <giles@thaumas.net>
Mon, 17 Sep 2012 16:12:28 +0000 (09:12 -0700)
committerRalph Giles <giles@thaumas.net>
Mon, 17 Sep 2012 16:12:28 +0000 (09:12 -0700)
commit449868849aededd4b21c601ba99f84978ff0dfcf
tree0e670483e5ce3c8764bac0f51148411ef89f7a28
parent3f18c55fd588500b4f9d97c8c793db15659a91c9
Don't include deps during 'make clean'.

If a source file moves (as in the previous commit), any stale
dependencies will block execution of 'make' because they
define a dependency relationship to an non-existant file.

The obvious thing to do is 'make clean' to get rid of the
dependency files, but of course that fails the same way.
To support this recovery, skip the include directive if
the GNU make variable MAKECMDGOALS is 'clean', exempting
this target from dependency checks.

Based on an example in the GNU make manual.
unix/Makefile