[llvm-commits] CVS: llvm/Makefile.common

Chris Lattner lattner at cs.uiuc.edu
Mon Aug 18 12:28:01 PDT 2003


Changes in directory llvm:

Makefile.common updated: 1.115 -> 1.116

---
Log message:

Add new cleandeps target, to allow easy cleaning out of .d files


---
Diffs of the changes:

Index: llvm/Makefile.common
diff -u llvm/Makefile.common:1.115 llvm/Makefile.common:1.116
--- llvm/Makefile.common:1.115	Fri Aug 15 15:00:47 2003
+++ llvm/Makefile.common	Mon Aug 18 12:27:40 2003
@@ -175,7 +175,7 @@
 # which are marked as Phony.
 #
 .PHONY: all dynamic bytecodelib bytecodelib-install
-.PHONY: clean distclean install test bytecode prdirs
+.PHONY: clean cleandeps distclean install test bytecode prdirs
 
 ###########################################################################
 # Miscellaneous paths and commands:
@@ -435,7 +435,7 @@
 #---------------------------------------------------------
 
 ifdef DIRS
-all install clean test bytecode ::
+all install clean cleandeps test bytecode ::
 	$(VERB) for dir in ${DIRS}; do \
 		(cd $$dir; $(MAKE) $@) || exit 1; \
 	done
@@ -446,16 +446,18 @@
 all      :: $(addsuffix /.makeall     , $(PARALLEL_DIRS))
 install  :: $(addsuffix /.makeinstall , $(PARALLEL_DIRS))
 clean    :: $(addsuffix /.makeclean   , $(PARALLEL_DIRS))
+cleandeps:: $(addsuffix /.makecleandeps, $(PARALLEL_DIRS))
 test     :: $(addsuffix /.maketest    , $(PARALLEL_DIRS))
 bytecode :: $(addsuffix /.makebytecode, $(PARALLEL_DIRS))
 
-%/.makeall %/.makeinstall %/.makeclean %/.maketest %/.makebytecode:
+%/.makeall %/.makeinstall %/.makeclean %/.makecleandeps %/.maketest \
+    %/.makebytecode:
 	$(VERB) cd $(@D); $(MAKE) $(subst $(@D)/.make,,$@)
 endif
 
 # Handle directories that may or may not exist
 ifdef OPTIONAL_DIRS
-all install clean test bytecode ::
+all install clean cleandeps test bytecode ::
 	$(VERB) for dir in ${OPTIONAL_DIRS}; do \
 		if [ -d $$dir ]; \
 		then\
@@ -831,8 +833,14 @@
 #
 ifneq ($(MAKECMDGOALS),clean)
 ifneq ($(MAKECMDGOALS),distclean)
+ifneq ($(MAKECMDGOALS),cleandeps)
 ifneq ($(SourceDepend),)
 -include $(SourceDepend)
 endif
 endif
 endif
+endif
+
+cleandeps::
+	$(VERB) rm -f $(SourceDepend)
+





More information about the llvm-commits mailing list