llvm.org GIT mirror llvm / 1ddb6b6
Add new cleandeps target, to allow easy cleaning out of .d files git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7954 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 16 years ago
2 changed file(s) with 24 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
174174 # which are marked as Phony.
175175 #
176176 .PHONY: all dynamic bytecodelib bytecodelib-install
177 .PHONY: clean distclean install test bytecode prdirs
177 .PHONY: clean cleandeps distclean install test bytecode prdirs
178178
179179 ###########################################################################
180180 # Miscellaneous paths and commands:
434434 #---------------------------------------------------------
435435
436436 ifdef DIRS
437 all install clean test bytecode ::
437 all install clean cleandeps test bytecode ::
438438 $(VERB) for dir in ${DIRS}; do \
439439 (cd $$dir; $(MAKE) $@) || exit 1; \
440440 done
445445 all :: $(addsuffix /.makeall , $(PARALLEL_DIRS))
446446 install :: $(addsuffix /.makeinstall , $(PARALLEL_DIRS))
447447 clean :: $(addsuffix /.makeclean , $(PARALLEL_DIRS))
448 cleandeps:: $(addsuffix /.makecleandeps, $(PARALLEL_DIRS))
448449 test :: $(addsuffix /.maketest , $(PARALLEL_DIRS))
449450 bytecode :: $(addsuffix /.makebytecode, $(PARALLEL_DIRS))
450451
451 %/.makeall %/.makeinstall %/.makeclean %/.maketest %/.makebytecode:
452 %/.makeall %/.makeinstall %/.makeclean %/.makecleandeps %/.maketest \
453 %/.makebytecode:
452454 $(VERB) cd $(@D); $(MAKE) $(subst $(@D)/.make,,$@)
453455 endif
454456
455457 # Handle directories that may or may not exist
456458 ifdef OPTIONAL_DIRS
457 all install clean test bytecode ::
459 all install clean cleandeps test bytecode ::
458460 $(VERB) for dir in ${OPTIONAL_DIRS}; do \
459461 if [ -d $$dir ]; \
460462 then\
830832 #
831833 ifneq ($(MAKECMDGOALS),clean)
832834 ifneq ($(MAKECMDGOALS),distclean)
835 ifneq ($(MAKECMDGOALS),cleandeps)
833836 ifneq ($(SourceDepend),)
834837 -include $(SourceDepend)
835838 endif
836839 endif
837840 endif
841 endif
842
843 cleandeps::
844 $(VERB) rm -f $(SourceDepend)
845
174174 # which are marked as Phony.
175175 #
176176 .PHONY: all dynamic bytecodelib bytecodelib-install
177 .PHONY: clean distclean install test bytecode prdirs
177 .PHONY: clean cleandeps distclean install test bytecode prdirs
178178
179179 ###########################################################################
180180 # Miscellaneous paths and commands:
434434 #---------------------------------------------------------
435435
436436 ifdef DIRS
437 all install clean test bytecode ::
437 all install clean cleandeps test bytecode ::
438438 $(VERB) for dir in ${DIRS}; do \
439439 (cd $$dir; $(MAKE) $@) || exit 1; \
440440 done
445445 all :: $(addsuffix /.makeall , $(PARALLEL_DIRS))
446446 install :: $(addsuffix /.makeinstall , $(PARALLEL_DIRS))
447447 clean :: $(addsuffix /.makeclean , $(PARALLEL_DIRS))
448 cleandeps:: $(addsuffix /.makecleandeps, $(PARALLEL_DIRS))
448449 test :: $(addsuffix /.maketest , $(PARALLEL_DIRS))
449450 bytecode :: $(addsuffix /.makebytecode, $(PARALLEL_DIRS))
450451
451 %/.makeall %/.makeinstall %/.makeclean %/.maketest %/.makebytecode:
452 %/.makeall %/.makeinstall %/.makeclean %/.makecleandeps %/.maketest \
453 %/.makebytecode:
452454 $(VERB) cd $(@D); $(MAKE) $(subst $(@D)/.make,,$@)
453455 endif
454456
455457 # Handle directories that may or may not exist
456458 ifdef OPTIONAL_DIRS
457 all install clean test bytecode ::
459 all install clean cleandeps test bytecode ::
458460 $(VERB) for dir in ${OPTIONAL_DIRS}; do \
459461 if [ -d $$dir ]; \
460462 then\
830832 #
831833 ifneq ($(MAKECMDGOALS),clean)
832834 ifneq ($(MAKECMDGOALS),distclean)
835 ifneq ($(MAKECMDGOALS),cleandeps)
833836 ifneq ($(SourceDepend),)
834837 -include $(SourceDepend)
835838 endif
836839 endif
837840 endif
841 endif
842
843 cleandeps::
844 $(VERB) rm -f $(SourceDepend)
845