OSDN Git Service

build: Tidy up a bunch of tool Makefiles, and simplify where possible using the
authorDaniel Dunbar <daniel@zuster.org>
Tue, 18 Oct 2011 19:27:24 +0000 (19:27 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Tue, 18 Oct 2011 19:27:24 +0000 (19:27 +0000)
new all-targets pseudo-component.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142401 91177308-0d34-0410-b5e6-96231b3b80d8

28 files changed:
tools/bugpoint-passes/Makefile
tools/bugpoint/Makefile
tools/edis/Makefile
tools/gold/Makefile
tools/llc/Makefile
tools/lli/Makefile
tools/llvm-ar/Makefile
tools/llvm-as/Makefile
tools/llvm-bcanalyzer/Makefile
tools/llvm-cov/Makefile
tools/llvm-diff/Makefile
tools/llvm-dis/Makefile
tools/llvm-dwarfdump/Makefile
tools/llvm-extract/Makefile
tools/llvm-ld/Makefile
tools/llvm-link/Makefile
tools/llvm-mc/Makefile
tools/llvm-nm/Makefile
tools/llvm-objdump/Makefile
tools/llvm-prof/Makefile
tools/llvm-ranlib/Makefile
tools/llvm-rtdyld/Makefile
tools/llvm-shlib/Makefile
tools/llvm-size/Makefile
tools/llvm-stub/Makefile
tools/lto/Makefile
tools/macho-dump/Makefile
tools/opt/Makefile

index b4ad3e4..61f96bc 100644 (file)
@@ -7,10 +7,10 @@
 #
 ##===----------------------------------------------------------------------===##
 
-LEVEL = ../..
-LIBRARYNAME = BugpointPasses
-LOADABLE_MODULE = 1
-USEDLIBS =
+LEVEL := ../..
+LIBRARYNAME := BugpointPasses
+LOADABLE_MODULE := 1
+USEDLIBS :=
 
 # If we don't need RTTI or EH, there's no reason to export anything
 # from this plugin.
index 5d287ef..eacaa47 100644 (file)
@@ -6,11 +6,10 @@
 # License. See LICENSE.TXT for details.
 # 
 ##===----------------------------------------------------------------------===##
-LEVEL = ../..
 
-TOOLNAME = bugpoint
-
-LINK_COMPONENTS := asmparser instrumentation scalaropts ipo \
-                   linker bitreader bitwriter
+LEVEL := ../..
+TOOLNAME := bugpoint
+LINK_COMPONENTS := asmparser instrumentation scalaropts ipo linker bitreader \
+                   bitwriter
 
 include $(LEVEL)/Makefile.common
index 3fcb408..39a5cf7 100644 (file)
@@ -7,9 +7,9 @@
 # 
 ##===----------------------------------------------------------------------===##
 
-LEVEL = ../..
-LIBRARYNAME = EnhancedDisassembly
-LINK_LIBS_IN_SHARED = 1
+LEVEL := ../..
+LIBRARYNAME := EnhancedDisassembly
+LINK_LIBS_IN_SHARED := 1
 
 EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/EnhancedDisassembly.exports
 
index 759406f..78eda03 100644 (file)
@@ -7,8 +7,12 @@
 # 
 ##===----------------------------------------------------------------------===##
 
-LEVEL = ../..
-LIBRARYNAME = LLVMgold
+LEVEL := ../..
+LIBRARYNAME := LLVMgold
+LINK_COMPONENTS := support
+LINK_LIBS_IN_SHARED := 1
+SHARED_LIBRARY := 1
+LOADABLE_MODULE := 1
 
 EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/gold.exports
 
@@ -17,15 +21,9 @@ EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/gold.exports
 # early so we can set up LINK_COMPONENTS before including Makefile.rules
 include $(LEVEL)/Makefile.config
 
-LINK_LIBS_IN_SHARED=1
-SHARED_LIBRARY = 1
-LOADABLE_MODULE = 1
-
-LINK_COMPONENTS := support
-
 # Because off_t is used in the public API, the largefile parts are required for
 # ABI compatibility.
-CXXFLAGS+=-I$(BINUTILS_INCDIR) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-CXXFLAGS+=$(SharedLibDir)/$(SharedPrefix)LTO$(SHLIBEXT)
+CXXFLAGS += -I$(BINUTILS_INCDIR) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+CXXFLAGS += $(SharedLibDir)/$(SharedPrefix)LTO$(SHLIBEXT)
 
 include $(LEVEL)/Makefile.common
index 7319aad..b32d557 100644 (file)
@@ -7,15 +7,9 @@
 # 
 ##===----------------------------------------------------------------------===##
 
-LEVEL = ../..
-TOOLNAME = llc
+LEVEL := ../..
+TOOLNAME := llc
+LINK_COMPONENTS := all-targets bitreader asmparser
 
-# Include this here so we can get the configuration of the targets
-# that have been configured for construction. We have to do this 
-# early so we can set up LINK_COMPONENTS before including Makefile.rules
-include $(LEVEL)/Makefile.config
-
-LINK_COMPONENTS := $(TARGETS_TO_BUILD) bitreader asmparser
-
-include $(LLVM_SRC_ROOT)/Makefile.rules
+include $(LEVEL)/Makefile.common
 
index 80aa82b..292f608 100644 (file)
@@ -7,9 +7,8 @@
 # 
 ##===----------------------------------------------------------------------===##
 
-LEVEL    := ../..
+LEVEL := ../..
 TOOLNAME := lli
 LINK_COMPONENTS := mcjit jit interpreter nativecodegen bitreader asmparser selectiondag
 
-# Enable JIT support
 include $(LEVEL)/Makefile.common
index 686ffd4..6ee6f34 100644 (file)
@@ -6,13 +6,13 @@
 # License. See LICENSE.TXT for details.
 # 
 ##===----------------------------------------------------------------------===##
-LEVEL = ../..
 
-TOOLNAME = llvm-ar
-LINK_COMPONENTS = archive
+LEVEL := ../..
+TOOLNAME := llvm-ar
+LINK_COMPONENTS := archive
 REQUIRES_EH := 1
 
 # This tool has no plugins, optimize startup time.
-TOOL_NO_EXPORTS = 1
+TOOL_NO_EXPORTS := 1
 
 include $(LEVEL)/Makefile.common
index e1e5853..dfd71b2 100644 (file)
@@ -7,11 +7,11 @@
 # 
 ##===----------------------------------------------------------------------===##
 
-LEVEL = ../..
-TOOLNAME = llvm-as
+LEVEL := ../..
+TOOLNAME := llvm-as
 LINK_COMPONENTS := asmparser bitwriter
 
 # This tool has no plugins, optimize startup time.
-TOOL_NO_EXPORTS = 1
+TOOL_NO_EXPORTS := 1
 
 include $(LEVEL)/Makefile.common
index 488387d..2fc61db 100644 (file)
@@ -6,12 +6,12 @@
 # License. See LICENSE.TXT for details.
 # 
 ##===----------------------------------------------------------------------===##
-LEVEL = ../..
 
-TOOLNAME = llvm-bcanalyzer
+LEVEL := ../..
+TOOLNAME := llvm-bcanalyzer
 LINK_COMPONENTS := bitreader
 
 # This tool has no plugins, optimize startup time.
-TOOL_NO_EXPORTS = 1
+TOOL_NO_EXPORTS := 1
 
 include $(LEVEL)/Makefile.common
index bd9fa2a..2d47ce4 100644 (file)
@@ -7,12 +7,11 @@
 # 
 ##===----------------------------------------------------------------------===##
 
-LEVEL = ../..
-
-TOOLNAME = llvm-cov
+LEVEL := ../..
+TOOLNAME := llvm-cov
 LINK_COMPONENTS := instrumentation
 
 # This tool has no plugins, optimize startup time.
-TOOL_NO_EXPORTS = 1
+TOOL_NO_EXPORTS := 1
 
 include $(LEVEL)/Makefile.common
index 58e49fa..f7fa715 100644 (file)
@@ -7,11 +7,11 @@
 # 
 ##===----------------------------------------------------------------------===##
 
-LEVEL = ../..
-TOOLNAME = llvm-diff
+LEVEL := ../..
+TOOLNAME := llvm-diff
 LINK_COMPONENTS := asmparser bitreader
 
 # This tool has no plugins, optimize startup time.
-TOOL_NO_EXPORTS = 1
+TOOL_NO_EXPORTS := 1
 
 include $(LEVEL)/Makefile.common
index be71100..aeeeed0 100644 (file)
@@ -6,12 +6,12 @@
 # License. See LICENSE.TXT for details.
 # 
 ##===----------------------------------------------------------------------===##
-LEVEL = ../..
 
-TOOLNAME = llvm-dis
+LEVEL := ../..
+TOOLNAME := llvm-dis
 LINK_COMPONENTS := bitreader analysis
 
 # This tool has no plugins, optimize startup time.
-TOOL_NO_EXPORTS = 1
+TOOL_NO_EXPORTS := 1
 
 include $(LEVEL)/Makefile.common
index e61f27d..7ca1a8d 100644 (file)
@@ -6,12 +6,12 @@
 # License. See LICENSE.TXT for details.
 #
 ##===----------------------------------------------------------------------===##
-LEVEL = ../..
 
-TOOLNAME = llvm-dwarfdump
-LINK_COMPONENTS = DebugInfo Object
+LEVEL := ../..
+TOOLNAME := llvm-dwarfdump
+LINK_COMPONENTS := DebugInfo Object
 
 # This tool has no plugins, optimize startup time.
-TOOL_NO_EXPORTS = 1
+TOOL_NO_EXPORTS := 1
 
 include $(LEVEL)/Makefile.common
index 5672aa3..a1e93f5 100644 (file)
@@ -7,12 +7,11 @@
 # 
 ##===----------------------------------------------------------------------===##
 
-LEVEL = ../..
-
-TOOLNAME = llvm-extract
+LEVEL := ../..
+TOOLNAME := llvm-extract
 LINK_COMPONENTS := ipo bitreader bitwriter asmparser
 
 # This tool has no plugins, optimize startup time.
-TOOL_NO_EXPORTS = 1
+TOOL_NO_EXPORTS := 1
 
 include $(LEVEL)/Makefile.common
index 1ef9bf1..2ec6e0a 100644 (file)
@@ -7,9 +7,8 @@
 # 
 ##===----------------------------------------------------------------------===##
 
-LEVEL = ../..
-
-TOOLNAME = llvm-ld
-LINK_COMPONENTS = ipo scalaropts linker archive bitwriter
+LEVEL := ../..
+TOOLNAME := llvm-ld
+LINK_COMPONENTS := ipo scalaropts linker archive bitwriter
 
 include $(LEVEL)/Makefile.common
index 2637018..2553db0 100644 (file)
@@ -6,12 +6,12 @@
 # License. See LICENSE.TXT for details.
 # 
 ##===----------------------------------------------------------------------===##
-LEVEL = ../..
 
-TOOLNAME = llvm-link
-LINK_COMPONENTS = linker bitreader bitwriter asmparser
+LEVEL := ../..
+TOOLNAME := llvm-link
+LINK_COMPONENTS := linker bitreader bitwriter asmparser
 
 # This tool has no plugins, optimize startup time.
-TOOL_NO_EXPORTS = 1
+TOOL_NO_EXPORTS := 1
 
 include $(LEVEL)/Makefile.common
index 934a6e4..b147fad 100644 (file)
@@ -7,18 +7,11 @@
 # 
 ##===----------------------------------------------------------------------===##
 
-LEVEL = ../..
-TOOLNAME = llvm-mc
+LEVEL := ../..
+TOOLNAME := llvm-mc
+LINK_COMPONENTS := all-targets MCDisassembler MCParser MC support
 
 # This tool has no plugins, optimize startup time.
-TOOL_NO_EXPORTS = 1
-
-# Include this here so we can get the configuration of the targets
-# that have been configured for construction. We have to do this 
-# early so we can set up LINK_COMPONENTS before including Makefile.rules
-include $(LEVEL)/Makefile.config
-
-LINK_COMPONENTS := $(TARGETS_TO_BUILD) MCDisassembler MCParser MC support
-
-include $(LLVM_SRC_ROOT)/Makefile.rules
+TOOL_NO_EXPORTS := 1
 
+include $(LEVEL)/Makefile.common
index 6bb4cd4..d9cee98 100644 (file)
@@ -6,12 +6,12 @@
 # License. See LICENSE.TXT for details.
 # 
 ##===----------------------------------------------------------------------===##
-LEVEL = ../..
 
-TOOLNAME = llvm-nm
-LINK_COMPONENTS = archive bitreader object
+LEVEL := ../..
+TOOLNAME := llvm-nm
+LINK_COMPONENTS := archive bitreader object
 
 # This tool has no plugins, optimize startup time.
-TOOL_NO_EXPORTS = 1
+TOOL_NO_EXPORTS := 1
 
 include $(LEVEL)/Makefile.common
index 703bf6c..4616b78 100644 (file)
@@ -6,13 +6,12 @@
 # License. See LICENSE.TXT for details.
 #
 ##===----------------------------------------------------------------------===##
-LEVEL = ../..
 
-TOOLNAME = llvm-objdump
-LINK_COMPONENTS = $(TARGETS_TO_BUILD) DebugInfo MC MCParser MCDisassembler \
-                  Object
+LEVEL := ../..
+TOOLNAME := llvm-objdump
+LINK_COMPONENTS := all-targets DebugInfo MC MCParser MCDisassembler Object
 
 # This tool has no plugins, optimize startup time.
-TOOL_NO_EXPORTS = 1
+TOOL_NO_EXPORTS := 1
 
 include $(LEVEL)/Makefile.common
index 86eb54d..f829786 100644 (file)
@@ -6,10 +6,10 @@
 # License. See LICENSE.TXT for details.
 # 
 ##===----------------------------------------------------------------------===##
-LEVEL = ../..
 
-TOOLNAME = llvm-prof
-LINK_COMPONENTS = bitreader analysis
+LEVEL := ../..
+TOOLNAME := llvm-prof
+LINK_COMPONENTS := bitreader analysis
 
 # This tool has no plugins, optimize startup time.
 TOOL_NO_EXPORTS = 1
index 46a10e6..36195f4 100644 (file)
@@ -7,12 +7,12 @@
 # 
 ##===----------------------------------------------------------------------===##
 
-LEVEL = ../..
-TOOLNAME = llvm-ranlib
-LINK_COMPONENTS = archive
+LEVEL := ../..
+TOOLNAME := llvm-ranlib
+LINK_COMPONENTS := archive
 REQUIRES_EH := 1
 
 # This tool has no plugins, optimize startup time.
-TOOL_NO_EXPORTS = 1
+TOOL_NO_EXPORTS := 1
 
 include $(LEVEL)/Makefile.common
index 0d57277..30fbee0 100644 (file)
@@ -7,17 +7,11 @@
 #
 ##===----------------------------------------------------------------------===##
 
-LEVEL = ../..
-TOOLNAME = llvm-rtdyld
+LEVEL := ../..
+TOOLNAME := llvm-rtdyld
+LINK_COMPONENTS := all-targets support MC object RuntimeDyld JIT
 
 # This tool has no plugins, optimize startup time.
-TOOL_NO_EXPORTS = 1
+TOOL_NO_EXPORTS := 1
 
-# Include this here so we can get the configuration of the targets
-# that have been configured for construction. We have to do this
-# early so we can set up LINK_COMPONENTS before including Makefile.rules
-include $(LEVEL)/Makefile.config
-
-LINK_COMPONENTS := $(TARGETS_TO_BUILD) support MC object RuntimeDyld JIT
-
-include $(LLVM_SRC_ROOT)/Makefile.rules
+include $(LEVEL)/Makefile.common
index 0695c00..1d35670 100644 (file)
@@ -7,13 +7,13 @@
 # 
 ##===----------------------------------------------------------------------===##
 
-LEVEL = ../..
+LEVEL := ../..
 
 LIBRARYNAME = LLVM-$(LLVMVersion)
 
-NO_BUILD_ARCHIVE = 1
-LINK_LIBS_IN_SHARED = 1
-SHARED_LIBRARY = 1
+NO_BUILD_ARCHIVE := 1
+LINK_LIBS_IN_SHARED := 1
+SHARED_LIBRARY := 1
 
 include $(LEVEL)/Makefile.config
 
index 5d0e27e..0622eb1 100644 (file)
@@ -6,10 +6,10 @@
 # License. See LICENSE.TXT for details.
 #
 ##===----------------------------------------------------------------------===##
-LEVEL = ../..
 
-TOOLNAME = llvm-size
-LINK_COMPONENTS = object
+LEVEL := ../..
+TOOLNAME := llvm-size
+LINK_COMPONENTS := object
 
 # This tool has no plugins, optimize startup time.
 TOOL_NO_EXPORTS = 1
index 7ffe149..077efa2 100644 (file)
@@ -7,7 +7,9 @@
 # 
 ##===----------------------------------------------------------------------===##
 
-LEVEL = ../..
-TOOLNAME = llvm-stub
+LEVEL := ../..
+TOOLNAME := llvm-stub
+LINK_COMPONENTS := object
+
 include $(LEVEL)/Makefile.common
 
index 46925e7..ef78f82 100644 (file)
@@ -7,22 +7,15 @@
 # 
 ##===----------------------------------------------------------------------===##
 
-LEVEL = ../..
-LIBRARYNAME = LTO
+LEVEL := ../..
+LIBRARYNAME := LTO
+LINK_COMPONENTS := all-targets ipo scalaropts linker bitreader bitwriter \
+                   mcdisassembler
+LINK_LIBS_IN_SHARED := 1
+SHARED_LIBRARY := 1
 
 EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/lto.exports
 
-# Include this here so we can get the configuration of the targets
-# that have been configured for construction. We have to do this 
-# early so we can set up LINK_COMPONENTS before including Makefile.rules
-include $(LEVEL)/Makefile.config
-
-LINK_LIBS_IN_SHARED = 1
-SHARED_LIBRARY = 1
-
-LINK_COMPONENTS := $(TARGETS_TO_BUILD) ipo scalaropts linker bitreader \
-       bitwriter mcdisassembler
-
 include $(LEVEL)/Makefile.common
 
 ifdef LLVM_VERSION_INFO
index 638015e..0843e98 100644 (file)
@@ -7,17 +7,11 @@
 #
 ##===----------------------------------------------------------------------===##
 
-LEVEL = ../..
-TOOLNAME = macho-dump
+LEVEL := ../..
+TOOLNAME := macho-dump
+LINK_COMPONENTS := support object
 
 # This tool has no plugins, optimize startup time.
-TOOL_NO_EXPORTS = 1
-
-# Include this here so we can get the configuration of the targets
-# that have been configured for construction. We have to do this
-# early so we can set up LINK_COMPONENTS before including Makefile.rules
-include $(LEVEL)/Makefile.config
-
-LINK_COMPONENTS := support object
+TOOL_NO_EXPORTS := 1
 
-include $(LLVM_SRC_ROOT)/Makefile.rules
+include $(LEVEL)/Makefile.common
index 726cad8..e8cd7e2 100644 (file)
@@ -6,9 +6,9 @@
 # License. See LICENSE.TXT for details.
 #
 ##===----------------------------------------------------------------------===##
-LEVEL = ../..
-TOOLNAME = opt
 
+LEVEL := ../..
+TOOLNAME := opt
 LINK_COMPONENTS := bitreader bitwriter asmparser instrumentation scalaropts ipo
 
 include $(LEVEL)/Makefile.common