OSDN Git Service

Fix build breakage when objdir!=srcdir (proper fix).
authorMikhail Glushenkov <foldr@codedgers.com>
Fri, 3 Oct 2008 10:26:37 +0000 (10:26 +0000)
committerMikhail Glushenkov <foldr@codedgers.com>
Fri, 3 Oct 2008 10:26:37 +0000 (10:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56999 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvmc2/Makefile
tools/llvmc2/plugins/Base/Makefile
tools/llvmc2/plugins/Clang/Makefile
tools/llvmc2/plugins/Hello/Makefile
tools/llvmc2/plugins/Makefile [moved from tools/llvmc2/plugins/Makefile.plugins with 82% similarity]

index 63f933d..3f35de0 100644 (file)
@@ -11,10 +11,9 @@ LEVEL = ../..
 
 BUILTIN_PLUGINS = Base
 DRIVER_NAME = llvmc2
-DIRS = $(patsubst %,plugins/%,$(BUILTIN_PLUGINS)) src
+DIRS = plugins src
 
 export BUILTIN_PLUGINS
 export DRIVER_NAME
-export BUILTIN_LLVMC_PLUGIN=1
 
 include $(LEVEL)/Makefile.common
index d8f7610..89cdaf4 100644 (file)
@@ -9,4 +9,4 @@
 
 LLVMC_PLUGIN = Base
 
-include ../Makefile.plugins
+include ../Makefile
index da1043e..e48824a 100644 (file)
@@ -9,5 +9,5 @@
 
 LLVMC_PLUGIN = Clang
 
-include ../Makefile.plugins
+include ../Makefile
 
index 0fcaaa7..f0d51dd 100644 (file)
@@ -9,4 +9,4 @@
 
 LLVMC_PLUGIN = Hello
 
-include ../Makefile.plugins
+include ../Makefile
similarity index 82%
rename from tools/llvmc2/plugins/Makefile.plugins
rename to tools/llvmc2/plugins/Makefile
index 51e297d..568752e 100644 (file)
@@ -7,11 +7,20 @@
 #
 ##===----------------------------------------------------------------------===##
 
-LEVEL = ../../../..
-
 ifndef LLVMC_PLUGIN
-$(error LLVMC_PLUGIN variable is not defined!)
-endif
+
+LEVEL = ../../..
+DIRS = $(BUILTIN_PLUGINS)
+
+# TOFIX: DSO versions of plugins are not built
+
+export BUILTIN_LLVMC_PLUGIN=1
+
+include $(LEVEL)/Makefile.common
+
+else # LLVMC_PLUGIN
+
+LEVEL = ../../../..
 
 LIBRARYNAME = $(patsubst %,LLVMC%,$(LLVMC_PLUGIN))
 TOOLS_SOURCE = $(wildcard $(PROJ_SRC_DIR)/*.td)
@@ -40,4 +49,6 @@ $(ObjDir)/AutoGenerated.inc.tmp: $(TOOLS_SOURCE) $(ObjDir)/.dir \
 
 AutoGenerated.inc : $(ObjDir)/AutoGenerated.inc.tmp
        $(Verb) $(CMP) -s $@ $< || $(CP) $< $@
-endif
+endif # BUILD_AUTOGENERATED_INC
+
+endif # LLVMC_PLUGIN