summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-07-26 19:10:34 +0000
committerChris Lattner <sabre@nondot.org>2006-07-26 19:10:34 +0000
commit5720be4138bba4fafb72a0f3034cfe47af40b696 (patch)
treee8bfcf9a9404683528c507de80dec108390993ee /Makefile
parentdd3f6aa91ffb58535ac3948fe84cf7a9dc8fc384 (diff)
downloadllvm-5720be4138bba4fafb72a0f3034cfe47af40b696.tar.gz
llvm-5720be4138bba4fafb72a0f3034cfe47af40b696.tar.bz2
llvm-5720be4138bba4fafb72a0f3034cfe47af40b696.tar.xz
Revamp this to use filter-out, which makes the logic simpler and not nested.
This restores building of examples and projects! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29297 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile39
1 files changed, 18 insertions, 21 deletions
diff --git a/Makefile b/Makefile
index 4b68b97a1e..b48b49b167 100644
--- a/Makefile
+++ b/Makefile
@@ -7,39 +7,35 @@
#
#===------------------------------------------------------------------------===#
-LEVEL = .
-DIRS = lib/System lib/Support utils lib/VMCore lib
+LEVEL := .
+DIRS := lib/System lib/Support utils lib/VMCore lib tools runtime docs
+OPTIONAL_DIRS := examples projects
+EXTRA_DIST := test llvm.spec include win32 Xcode
include $(LEVEL)/Makefile.config
+# llvm-gcc4 doesn't need runtime libs.
+ifeq ($(LLVMGCC_MAJVERS),4)
+ DIRS := $(filter-out runtime, $(DIRS))
+endif
+
+ifeq ($(MAKECMDGOALS),libs-only)
+ DIRS := $(filter-out tools runtime docs, $(DIRS))
+ OPTIONAL_DIRS :=
+endif
ifeq ($(MAKECMDGOALS),tools-only)
- DIRS += tools
-else
- ifneq ($(MAKECMDGOALS),libs-only)
- DIRS += tools
- ifneq ($(LLVMGCC_MAJVERS),4)
- DIRS += runtime
- else
- $(warning Skipping runtime libraries, llvm-gcc 4 detected.)
- endif
-
- DIRS += docs
- endif
+ DIRS := $(filter-out runtime docs, $(DIRS))
+ OPTIONAL_DIRS :=
endif
-# Don't install utils, they are only used to build LLVM.
-#
+# Don't install utils, examples, or projects they are only used to
+# build LLVM.
ifeq ($(MAKECMDGOALS),install)
DIRS := $(filter-out utils, $(DIRS))
-
- # Don't install examples or projects.
OPTIONAL_DIRS :=
endif
-
-EXTRA_DIST := test llvm.spec include win32 Xcode
-
# Include the main makefile machinery.
include $(LLVM_SRC_ROOT)/Makefile.rules
@@ -103,3 +99,4 @@ endif
check-llvm2cpp:
$(MAKE) check TESTSUITE=Feature RUNLLVM2CPP=1
+