Fix build breakage when objdir!=srcdir (proper fix).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56999 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Mikhail Glushenkov 2008-10-03 10:26:37 +00:00
parent 9d1b696441
commit c32dece5a8
5 changed files with 20 additions and 10 deletions

View 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

View File

@ -9,4 +9,4 @@
LLVMC_PLUGIN = Base
include ../Makefile.plugins
include ../Makefile

View File

@ -9,5 +9,5 @@
LLVMC_PLUGIN = Clang
include ../Makefile.plugins
include ../Makefile

View File

@ -9,4 +9,4 @@
LLVMC_PLUGIN = Hello
include ../Makefile.plugins
include ../Makefile

View 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