]> git.cameronkatri.com Git - cgit.git/commitdiff
Makefile: do not include dependency-file on `make clean`
authorLynn Lin <Lin_Lynn@emc.com>
Thu, 15 Jul 2010 06:38:06 +0000 (14:38 +0800)
committerLars Hjemli <hjemli@gmail.com>
Thu, 22 Jul 2010 21:32:06 +0000 (23:32 +0200)
When envoking clean target, make should not perform the dependency file
generation triggered by include.

Makefile

index 3a4d974949f3a48ca339bdc4f2984733e25c9049..8b426fe902352cabb40e88cb657c2233def25722 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -139,7 +139,9 @@ cgit: $(OBJECTS) libgit
 
 cgit.o: VERSION
 
--include $(OBJECTS:.o=.d)
+ifneq "$(MAKECMDGOALS)" "clean"
+  -include $(OBJECTS:.o=.d)
+endif
 
 libgit:
        $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 $(GIT_OPTIONS) libgit.a