summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2008-10-03 09:09:34 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2008-10-03 09:09:34 +0000
commit657e1c5c9671bbefd544d0a77ef853f583b98087 (patch)
treee71346992d1a7325d6fc21fc3fbdf88a79377ddc
parent6e42742d2d4cf50e889f4617f79ecca1b1dd6e77 (diff)
downloadbcm5719-llvm-657e1c5c9671bbefd544d0a77ef853f583b98087.tar.gz
bcm5719-llvm-657e1c5c9671bbefd544d0a77ef853f583b98087.zip
Fix build breakage (again) when srcdir != objdir, other small fixes.
llvm-svn: 56998
-rw-r--r--llvm/tools/llvmc2/Makefile35
-rw-r--r--llvm/tools/llvmc2/examples/Simple.td2
-rw-r--r--llvm/tools/llvmc2/plugins/Base/Base.td2
-rw-r--r--llvm/tools/llvmc2/plugins/Clang/Clang.td2
-rw-r--r--llvm/tools/llvmc2/plugins/Makefile.plugins4
-rw-r--r--llvm/tools/llvmc2/src/Action.cpp (renamed from llvm/tools/llvmc2/Action.cpp)0
-rw-r--r--llvm/tools/llvmc2/src/CompilationGraph.cpp (renamed from llvm/tools/llvmc2/CompilationGraph.cpp)0
-rw-r--r--llvm/tools/llvmc2/src/Error.h (renamed from llvm/tools/llvmc2/Error.h)0
-rw-r--r--llvm/tools/llvmc2/src/Makefile19
-rw-r--r--llvm/tools/llvmc2/src/Plugin.cpp (renamed from llvm/tools/llvmc2/Plugin.cpp)0
-rw-r--r--llvm/tools/llvmc2/src/llvmc.cpp (renamed from llvm/tools/llvmc2/llvmc.cpp)0
11 files changed, 30 insertions, 34 deletions
diff --git a/llvm/tools/llvmc2/Makefile b/llvm/tools/llvmc2/Makefile
index 0c36d5b960e..63f933deb2e 100644
--- a/llvm/tools/llvmc2/Makefile
+++ b/llvm/tools/llvmc2/Makefile
@@ -7,39 +7,14 @@
#
##===----------------------------------------------------------------------===##
-# Compiled-in plugins
-##### FIXME: This breaks the build.
-#####BUILTIN_PLUGINS = Base
-
LEVEL = ../..
-TOOLNAME = llvmc2
-LINK_COMPONENTS = support system
-REQUIRES_EH := 1
-ifneq ($(BUILTIN_PLUGINS),)
+BUILTIN_PLUGINS = Base
+DRIVER_NAME = llvmc2
+DIRS = $(patsubst %,plugins/%,$(BUILTIN_PLUGINS)) src
+export BUILTIN_PLUGINS
+export DRIVER_NAME
export BUILTIN_LLVMC_PLUGIN=1
-USEDLIBS = $(patsubst %,LLVMC%,$(BUILTIN_PLUGINS))
-
-endif
include $(LEVEL)/Makefile.common
-
-TD_COMMON = $(wildcard $(LLVM_SRC_ROOT)/include/llvm/CompilerDriver/*.td)
-
-# There is probably a better way to do this: currently we enter the
-# subdirectory 2 times - the second time is not needed.
-# This probably also needs to be integrated into Makefile.rules.
-define PLUGIN_template
-PLUGIN_$(1)_SOURCES=$$(wildcard plugins/$(1)/*.cpp)
-PLUGIN_$(1)_TD_SOURCES=$$(wildcard plugins/$(1)/*.cpp)
-
-$$(LibDir)/LLVMC$(1).o: $$(PLUGIN_$(1)_SOURCES) $$(PLUGIN_$(1)_TD_SOURCES) \
- $$(TD_COMMON)
- @$$(MAKE) -C plugins/$(1)
-
-$$(RecursiveTargets) ::
- @$$(MAKE) -C plugins/$(1) $$@
-endef
-
-$(foreach plugin,$(BUILTIN_PLUGINS),$(eval $(call PLUGIN_template,$(plugin))))
diff --git a/llvm/tools/llvmc2/examples/Simple.td b/llvm/tools/llvmc2/examples/Simple.td
index 88d4f0e66bf..48853010425 100644
--- a/llvm/tools/llvmc2/examples/Simple.td
+++ b/llvm/tools/llvmc2/examples/Simple.td
@@ -1,6 +1,6 @@
// A simple wrapper for gcc.
// To compile, use this command:
-// make TOOLNAME=llvmc_simple GRAPH=examples/Simple.td
+// TOFIX
include "Common.td"
diff --git a/llvm/tools/llvmc2/plugins/Base/Base.td b/llvm/tools/llvmc2/plugins/Base/Base.td
index bc40dd56ed8..0a43d0fd533 100644
--- a/llvm/tools/llvmc2/plugins/Base/Base.td
+++ b/llvm/tools/llvmc2/plugins/Base/Base.td
@@ -1,4 +1,4 @@
-//===- Graph.td - LLVMC2 toolchain descriptions ------------*- tablegen -*-===//
+//===- Base.td - LLVMC2 toolchain descriptions -------------*- tablegen -*-===//
//
// The LLVM Compiler Infrastructure
//
diff --git a/llvm/tools/llvmc2/plugins/Clang/Clang.td b/llvm/tools/llvmc2/plugins/Clang/Clang.td
index 9985d70cda5..d30bc978aa8 100644
--- a/llvm/tools/llvmc2/plugins/Clang/Clang.td
+++ b/llvm/tools/llvmc2/plugins/Clang/Clang.td
@@ -1,7 +1,7 @@
// A (first stab at a) replacement for the Clang's ccc script.
// To compile, use this command:
// cd $LLVMC2_DIR
-// make TOOLNAME=ccc2 BUILTIN_PLUGINS=Clang
+// make DRIVER_NAME=ccc2 BUILTIN_PLUGINS=Clang
include "llvm/CompilerDriver/Common.td"
diff --git a/llvm/tools/llvmc2/plugins/Makefile.plugins b/llvm/tools/llvmc2/plugins/Makefile.plugins
index 4b5d19abf69..51e297d3758 100644
--- a/llvm/tools/llvmc2/plugins/Makefile.plugins
+++ b/llvm/tools/llvmc2/plugins/Makefile.plugins
@@ -1,4 +1,4 @@
-##===- tools/llvmc2/plugins/Makefile.common ----------------*- Makefile -*-===##
+##===- tools/llvmc2/plugins/Makefile.plugins ----------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
@@ -28,6 +28,8 @@ endif
include $(LEVEL)/Makefile.common
+# TOFIX: This should go into Makefile.rules
+
ifdef BUILD_AUTOGENERATED_INC
TD_COMMON = $(wildcard $(LLVM_SRC_ROOT)/include/llvm/CompilerDriver/*.td)
diff --git a/llvm/tools/llvmc2/Action.cpp b/llvm/tools/llvmc2/src/Action.cpp
index c0a1b849bcd..c0a1b849bcd 100644
--- a/llvm/tools/llvmc2/Action.cpp
+++ b/llvm/tools/llvmc2/src/Action.cpp
diff --git a/llvm/tools/llvmc2/CompilationGraph.cpp b/llvm/tools/llvmc2/src/CompilationGraph.cpp
index 838b9405013..838b9405013 100644
--- a/llvm/tools/llvmc2/CompilationGraph.cpp
+++ b/llvm/tools/llvmc2/src/CompilationGraph.cpp
diff --git a/llvm/tools/llvmc2/Error.h b/llvm/tools/llvmc2/src/Error.h
index c0aaff1a724..c0aaff1a724 100644
--- a/llvm/tools/llvmc2/Error.h
+++ b/llvm/tools/llvmc2/src/Error.h
diff --git a/llvm/tools/llvmc2/src/Makefile b/llvm/tools/llvmc2/src/Makefile
new file mode 100644
index 00000000000..7c04fe4aca4
--- /dev/null
+++ b/llvm/tools/llvmc2/src/Makefile
@@ -0,0 +1,19 @@
+##===- tools/llvmc2/src/Makefile ---------------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open
+# Source License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LEVEL = ../../..
+TOOLNAME = $(DRIVER_NAME)
+LINK_COMPONENTS = support system
+REQUIRES_EH := 1
+
+ifneq ($(BUILTIN_PLUGINS),)
+USEDLIBS = $(patsubst %,LLVMC%,$(BUILTIN_PLUGINS))
+endif
+
+include $(LEVEL)/Makefile.common
diff --git a/llvm/tools/llvmc2/Plugin.cpp b/llvm/tools/llvmc2/src/Plugin.cpp
index c9b3960c1e7..c9b3960c1e7 100644
--- a/llvm/tools/llvmc2/Plugin.cpp
+++ b/llvm/tools/llvmc2/src/Plugin.cpp
diff --git a/llvm/tools/llvmc2/llvmc.cpp b/llvm/tools/llvmc2/src/llvmc.cpp
index f3a1e571926..f3a1e571926 100644
--- a/llvm/tools/llvmc2/llvmc.cpp
+++ b/llvm/tools/llvmc2/src/llvmc.cpp
OpenPOWER on IntegriCloud