From 8c39c9647da4f375e4f89bd417d86f5c3ff6dfa5 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Tue, 18 Oct 2011 19:27:24 +0000 Subject: build: Tidy up a bunch of tool Makefiles, and simplify where possible using the new all-targets pseudo-component. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142401 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/bugpoint-passes/Makefile | 8 ++++---- tools/bugpoint/Makefile | 9 ++++----- tools/edis/Makefile | 6 +++--- tools/gold/Makefile | 18 ++++++++---------- tools/llc/Makefile | 14 ++++---------- tools/lli/Makefile | 3 +-- tools/llvm-ar/Makefile | 8 ++++---- tools/llvm-as/Makefile | 6 +++--- tools/llvm-bcanalyzer/Makefile | 6 +++--- tools/llvm-cov/Makefile | 7 +++---- tools/llvm-diff/Makefile | 6 +++--- tools/llvm-dis/Makefile | 6 +++--- tools/llvm-dwarfdump/Makefile | 8 ++++---- tools/llvm-extract/Makefile | 7 +++---- tools/llvm-ld/Makefile | 7 +++---- tools/llvm-link/Makefile | 8 ++++---- tools/llvm-mc/Makefile | 17 +++++------------ tools/llvm-nm/Makefile | 8 ++++---- tools/llvm-objdump/Makefile | 9 ++++----- tools/llvm-prof/Makefile | 6 +++--- tools/llvm-ranlib/Makefile | 8 ++++---- tools/llvm-rtdyld/Makefile | 16 +++++----------- tools/llvm-shlib/Makefile | 8 ++++---- tools/llvm-size/Makefile | 6 +++--- tools/llvm-stub/Makefile | 6 ++++-- tools/lto/Makefile | 19 ++++++------------- tools/macho-dump/Makefile | 16 +++++----------- tools/opt/Makefile | 4 ++-- 28 files changed, 106 insertions(+), 144 deletions(-) diff --git a/tools/bugpoint-passes/Makefile b/tools/bugpoint-passes/Makefile index b4ad3e4ad3..61f96bc338 100644 --- a/tools/bugpoint-passes/Makefile +++ b/tools/bugpoint-passes/Makefile @@ -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. diff --git a/tools/bugpoint/Makefile b/tools/bugpoint/Makefile index 5d287ef188..eacaa47a7b 100644 --- a/tools/bugpoint/Makefile +++ b/tools/bugpoint/Makefile @@ -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 diff --git a/tools/edis/Makefile b/tools/edis/Makefile index 3fcb408c88..39a5cf7273 100644 --- a/tools/edis/Makefile +++ b/tools/edis/Makefile @@ -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 diff --git a/tools/gold/Makefile b/tools/gold/Makefile index 759406f7b1..78eda03e34 100644 --- a/tools/gold/Makefile +++ b/tools/gold/Makefile @@ -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 diff --git a/tools/llc/Makefile b/tools/llc/Makefile index 7319aada48..b32d5575d5 100644 --- a/tools/llc/Makefile +++ b/tools/llc/Makefile @@ -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 diff --git a/tools/lli/Makefile b/tools/lli/Makefile index 80aa82b4d6..292f6087b1 100644 --- a/tools/lli/Makefile +++ b/tools/lli/Makefile @@ -7,9 +7,8 @@ # ##===----------------------------------------------------------------------===## -LEVEL := ../.. +LEVEL := ../.. TOOLNAME := lli LINK_COMPONENTS := mcjit jit interpreter nativecodegen bitreader asmparser selectiondag -# Enable JIT support include $(LEVEL)/Makefile.common diff --git a/tools/llvm-ar/Makefile b/tools/llvm-ar/Makefile index 686ffd4323..6ee6f34942 100644 --- a/tools/llvm-ar/Makefile +++ b/tools/llvm-ar/Makefile @@ -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 diff --git a/tools/llvm-as/Makefile b/tools/llvm-as/Makefile index e1e5853a7b..dfd71b295a 100644 --- a/tools/llvm-as/Makefile +++ b/tools/llvm-as/Makefile @@ -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 diff --git a/tools/llvm-bcanalyzer/Makefile b/tools/llvm-bcanalyzer/Makefile index 488387d5da..2fc61dbd62 100644 --- a/tools/llvm-bcanalyzer/Makefile +++ b/tools/llvm-bcanalyzer/Makefile @@ -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 diff --git a/tools/llvm-cov/Makefile b/tools/llvm-cov/Makefile index bd9fa2ad3d..2d47ce4d4b 100644 --- a/tools/llvm-cov/Makefile +++ b/tools/llvm-cov/Makefile @@ -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 diff --git a/tools/llvm-diff/Makefile b/tools/llvm-diff/Makefile index 58e49fa959..f7fa7159c5 100644 --- a/tools/llvm-diff/Makefile +++ b/tools/llvm-diff/Makefile @@ -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 diff --git a/tools/llvm-dis/Makefile b/tools/llvm-dis/Makefile index be71100086..aeeeed0d68 100644 --- a/tools/llvm-dis/Makefile +++ b/tools/llvm-dis/Makefile @@ -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 diff --git a/tools/llvm-dwarfdump/Makefile b/tools/llvm-dwarfdump/Makefile index e61f27d298..7ca1a8d877 100644 --- a/tools/llvm-dwarfdump/Makefile +++ b/tools/llvm-dwarfdump/Makefile @@ -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 diff --git a/tools/llvm-extract/Makefile b/tools/llvm-extract/Makefile index 5672aa3299..a1e93f5ce4 100644 --- a/tools/llvm-extract/Makefile +++ b/tools/llvm-extract/Makefile @@ -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 diff --git a/tools/llvm-ld/Makefile b/tools/llvm-ld/Makefile index 1ef9bf1174..2ec6e0a43a 100644 --- a/tools/llvm-ld/Makefile +++ b/tools/llvm-ld/Makefile @@ -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 diff --git a/tools/llvm-link/Makefile b/tools/llvm-link/Makefile index 26370187c5..2553db0cd3 100644 --- a/tools/llvm-link/Makefile +++ b/tools/llvm-link/Makefile @@ -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 diff --git a/tools/llvm-mc/Makefile b/tools/llvm-mc/Makefile index 934a6e4dd0..b147fadb57 100644 --- a/tools/llvm-mc/Makefile +++ b/tools/llvm-mc/Makefile @@ -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 diff --git a/tools/llvm-nm/Makefile b/tools/llvm-nm/Makefile index 6bb4cd4acc..d9cee98995 100644 --- a/tools/llvm-nm/Makefile +++ b/tools/llvm-nm/Makefile @@ -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 diff --git a/tools/llvm-objdump/Makefile b/tools/llvm-objdump/Makefile index 703bf6c8a4..4616b78adb 100644 --- a/tools/llvm-objdump/Makefile +++ b/tools/llvm-objdump/Makefile @@ -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 diff --git a/tools/llvm-prof/Makefile b/tools/llvm-prof/Makefile index 86eb54d51b..f829786765 100644 --- a/tools/llvm-prof/Makefile +++ b/tools/llvm-prof/Makefile @@ -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 diff --git a/tools/llvm-ranlib/Makefile b/tools/llvm-ranlib/Makefile index 46a10e6446..36195f4399 100644 --- a/tools/llvm-ranlib/Makefile +++ b/tools/llvm-ranlib/Makefile @@ -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 diff --git a/tools/llvm-rtdyld/Makefile b/tools/llvm-rtdyld/Makefile index 0d57277f08..30fbee0979 100644 --- a/tools/llvm-rtdyld/Makefile +++ b/tools/llvm-rtdyld/Makefile @@ -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 diff --git a/tools/llvm-shlib/Makefile b/tools/llvm-shlib/Makefile index 0695c0070d..1d35670182 100644 --- a/tools/llvm-shlib/Makefile +++ b/tools/llvm-shlib/Makefile @@ -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 diff --git a/tools/llvm-size/Makefile b/tools/llvm-size/Makefile index 5d0e27ed16..0622eb1089 100644 --- a/tools/llvm-size/Makefile +++ b/tools/llvm-size/Makefile @@ -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 diff --git a/tools/llvm-stub/Makefile b/tools/llvm-stub/Makefile index 7ffe14976b..077efa2d02 100644 --- a/tools/llvm-stub/Makefile +++ b/tools/llvm-stub/Makefile @@ -7,7 +7,9 @@ # ##===----------------------------------------------------------------------===## -LEVEL = ../.. -TOOLNAME = llvm-stub +LEVEL := ../.. +TOOLNAME := llvm-stub +LINK_COMPONENTS := object + include $(LEVEL)/Makefile.common diff --git a/tools/lto/Makefile b/tools/lto/Makefile index 46925e77de..ef78f82c8c 100644 --- a/tools/lto/Makefile +++ b/tools/lto/Makefile @@ -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 diff --git a/tools/macho-dump/Makefile b/tools/macho-dump/Makefile index 638015e928..0843e982e1 100644 --- a/tools/macho-dump/Makefile +++ b/tools/macho-dump/Makefile @@ -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 diff --git a/tools/opt/Makefile b/tools/opt/Makefile index 726cad8712..e8cd7e2857 100644 --- a/tools/opt/Makefile +++ b/tools/opt/Makefile @@ -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 -- cgit v1.2.3