diff options
author | Daniel Dunbar <daniel@zuster.org> | 2008-10-03 19:11:19 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2008-10-03 19:11:19 +0000 |
commit | 94e98af210573c1db4e7fd991c97eae15d853cf6 (patch) | |
tree | cb6ad43d18d17cb270989dc92b1a80a05f80bd01 | |
parent | 20da1f07dac4d771e55ee5c7f105ccedfa4caaaa (diff) |
Add IS_CLEANING_TARGET Makefile variable.
- Fixes bug in dependency inclusions where make with unspecified
target wouldn't include dependency files, eek!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57026 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | Makefile.rules | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Makefile.rules b/Makefile.rules index a9a8c34cb8..9aeb57d741 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -195,6 +195,11 @@ install-bytecode:: install-bytecode-local # VARIABLES: Set up various variables based on configuration data ############################################################################### +# Variable for if this make is for a "cleaning" target +ifneq ($(strip $(filter clean clean-local dist-clean,$(MAKECMDGOALS))),) + IS_CLEANING_TARGET=1 +endif + #-------------------------------------------------------------------- # Variables derived from configuration we are building #-------------------------------------------------------------------- @@ -739,7 +744,7 @@ LLVMUsedLibs := $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(LLVMLIBS))) LLVMLibsPaths := $(addprefix $(LLVMLibDir)/,$(LLVMUsedLibs)) endif -ifeq ($(strip $(filter clean clean-local dist-clean,$(MAKECMDGOALS))),) +ifndef IS_CLEANING_TARGET ifdef LINK_COMPONENTS # If LLVM_CONFIG doesn't exist, build it. This can happen if you do a make @@ -1507,7 +1512,7 @@ clean-all-local:: ifndef DISABLE_AUTO_DEPENDENCIES # If its not one of the cleaning targets -ifneq ($(strip $(filter-out clean clean-local dist-clean,$(MAKECMDGOALS))),) +ifndef IS_CLEANING_TARGET # Get the list of dependency files DependFiles := $(basename $(filter %.cpp %.c %.cc, $(Sources))) |