diff options
author | John Criswell <criswell@uiuc.edu> | 2003-09-09 20:57:03 +0000 |
---|---|---|
committer | John Criswell <criswell@uiuc.edu> | 2003-09-09 20:57:03 +0000 |
commit | 410d1b5dea31e457c5c5b88e019874789c251aee (patch) | |
tree | 5cf37d7f35474a191ff9da815e9b8a5e30fed605 /lib | |
parent | d9cd14440d6e44001d1280e75236b6a9d2247419 (diff) | |
download | external_llvm-410d1b5dea31e457c5c5b88e019874789c251aee.zip external_llvm-410d1b5dea31e457c5c5b88e019874789c251aee.tar.gz external_llvm-410d1b5dea31e457c5c5b88e019874789c251aee.tar.bz2 |
Updated to find source files using VPATH. This makes writing build rules
much cleaner and easier.
Labeled .td as a suffix for tblgen files in Makefile.rules.
Modified build rules so that source files generated during the build are placed
in the build directory and not the source directory (and not in a Debug
directory). This makes the system cleaner and allows us to have a read-only
source tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8424 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/SparcV9/Makefile | 21 | ||||
-rw-r--r-- | lib/Target/X86/Makefile | 6 |
2 files changed, 18 insertions, 9 deletions
diff --git a/lib/Target/SparcV9/Makefile b/lib/Target/SparcV9/Makefile index 47e8e19..0366844 100644 --- a/lib/Target/SparcV9/Makefile +++ b/lib/Target/SparcV9/Makefile @@ -1,7 +1,7 @@ LEVEL = ../../.. LIBRARYNAME = sparc -ExtraSource = Debug/Sparc.burm.cpp +ExtraSource = Sparc.burm.cpp include $(LEVEL)/Makefile.common @@ -11,22 +11,23 @@ else DEBUG_FLAG = -D_DEBUG endif -Debug/Sparc.burg.in1 : $(SourceDir)/Sparc.burg.in Debug/.dir +Sparc.burg.in1 : Sparc.burg.in $(CXX) -E -I$(LLVM_SRC_ROOT)/include $(DEBUG_FLAG) -x c++ $< | ${SED} '/^# /d' | ${SED} 's/Ydefine/#define/' > $@ -Debug/Sparc.burm : Debug/Sparc.burg.in1 +Sparc.burm : Sparc.burg.in1 $(CXX) -E -I$(LLVM_SRC_ROOT)/include $(DEBUG_FLAG) -x c++ $< | ${SED} '/^# /d' | ${SED} 's/Xinclude/#include/g' | ${SED} 's/Xdefine/#define/g' > $@ -Debug/Sparc.burm.cpp: Debug/Sparc.burm Debug/.dir +Sparc.burm.cpp: Sparc.burm + @echo "Burging $<" $(RunBurg) $< -o $@ -$(BUILD_OBJ_DIR)/Debug/Sparc.burm.lo: Debug/Sparc.burm.cpp +$(BUILD_OBJ_DIR)/Debug/Sparc.burm.lo: Sparc.burm.cpp $(CompileG) $< -o $@ -$(BUILD_OBJ_DIR)/Release/Sparc.burm.lo: Debug/Sparc.burm.cpp +$(BUILD_OBJ_DIR)/Release/Sparc.burm.lo: Sparc.burm.cpp $(CompileO) $< -o $@ -$(BUILD_OBJ_DIR)/Profile/Sparc.burm.lo: Debug/Sparc.burm.cpp +$(BUILD_OBJ_DIR)/Profile/Sparc.burm.lo: Sparc.burm.cpp $(CompileP) $< -o $@ $(BUILD_OBJ_DIR)/Depend/Sparc.burm.d: $(BUILD_OBJ_DIR)/Depend/.dir @@ -34,12 +35,14 @@ $(BUILD_OBJ_DIR)/Depend/Sparc.burm.d: $(BUILD_OBJ_DIR)/Depend/.dir TARGET_NAME := SparcV9 -TABLEGEN_FILES := $(wildcard $(SourceDir)/*.td) +TABLEGEN_FILES := $(notdir $(wildcard $(SourceDir)/*.td)) $(SourceDir)/$(TARGET_NAME)CodeEmitter.cpp:: $(TARGET_NAME)CodeEmitter.inc $(TARGET_NAME)CodeEmitter.inc:: $(TABLEGEN_FILES) $(TBLGEN) + @echo "Tblgen'ing $(TARGET_NAME).td" $(TBLGEN) -I $(SourceDir) $(SourceDir)/$(TARGET_NAME).td -gen-emitter -o $@ clean:: - ${RM} -f $(TARGET_NAME)CodeEmitter.inc + ${RM} -f $(TARGET_NAME)CodeEmitter.inc Sparc.burg.in1 Sparc.burm Sparc.burm.cpp + diff --git a/lib/Target/X86/Makefile b/lib/Target/X86/Makefile index 84d2e6d..84f168a 100644 --- a/lib/Target/X86/Makefile +++ b/lib/Target/X86/Makefile @@ -8,21 +8,27 @@ $(SourceDepend): X86GenRegisterInfo.h.inc X86GenRegisterNames.inc \ X86GenInstrInfo.inc X86GenInstrSelector.inc X86GenRegisterNames.inc:: X86.td X86RegisterInfo.td ../Target.td $(TBLGEN) + @echo "Tblgen'ing $<" $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-enums -o $@ X86GenRegisterInfo.h.inc:: X86.td X86RegisterInfo.td ../Target.td $(TBLGEN) + @echo "Tblgen'ing $<" $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-desc-header -o $@ X86GenRegisterInfo.inc:: X86.td X86RegisterInfo.td ../Target.td $(TBLGEN) + @echo "Tblgen'ing $<" $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-desc -o $@ X86GenInstrNames.inc:: X86.td X86InstrInfo.td ../Target.td $(TBLGEN) + @echo "Tblgen'ing $<" $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-instr-enums -o $@ X86GenInstrInfo.inc:: X86.td X86InstrInfo.td ../Target.td $(TBLGEN) + @echo "Tblgen'ing $<" $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-instr-desc -o $@ X86GenInstrSelector.inc:: X86.td X86InstrInfo.td ../Target.td $(TBLGEN) + @echo "Tblgen'ing $<" $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-instr-selector -o $@ clean:: |