Checkin of autoconf-style object root.
authorJohn Criswell <criswell@uiuc.edu>
Sat, 6 Sep 2003 14:50:22 +0000 (14:50 +0000)
committerJohn Criswell <criswell@uiuc.edu>
Sat, 6 Sep 2003 14:50:22 +0000 (14:50 +0000)
Adjusted Makefile to work with new autoconf-style object root.
Specifically, use the new -I option of tblgen to find include files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8379 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/SparcV9/Makefile
lib/Target/X86/Makefile

index c530fa6f22fad1cce4e3e637033555448ccb781e..47e8e193fade9eebc4b21e3aab5e45a31443522f 100644 (file)
@@ -11,6 +11,12 @@ else
   DEBUG_FLAG = -D_DEBUG
 endif
 
+Debug/Sparc.burg.in1 : $(SourceDir)/Sparc.burg.in Debug/.dir
+       $(CXX) -E -I$(LLVM_SRC_ROOT)/include $(DEBUG_FLAG) -x c++ $< | ${SED} '/^# /d' | ${SED} 's/Ydefine/#define/' > $@
+
+Debug/Sparc.burm : Debug/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
        $(RunBurg) $< -o $@
 
@@ -23,33 +29,17 @@ $(BUILD_OBJ_DIR)/Release/Sparc.burm.lo: Debug/Sparc.burm.cpp
 $(BUILD_OBJ_DIR)/Profile/Sparc.burm.lo: Debug/Sparc.burm.cpp
        $(CompileP) $< -o $@
 
-#$(BUILD_OBJ_DIR)/Debug/Sparc.burm.o: Debug/Sparc.burm.cpp
-#      $(CompileG) $< -o $@
-
-#$(BUILD_OBJ_DIR)/Release/Sparc.burm.o: Debug/Sparc.burm.cpp
-#      $(CompileO) $< -o $@
-
-#$(BUILD_OBJ_DIR)/Profile/Sparc.burm.o: Debug/Sparc.burm.cpp
-#      $(CompileP) $< -o $@
-
-Debug/Sparc.burg.in1 : Sparc.burg.in Debug/.dir
-       $(CXX) -E -I$(LEVEL)/include $(DEBUG_FLAG) -x c++ $< | ${SED} '/^# /d' | ${SED} 's/Ydefine/#define/' > $@
-
-Debug/Sparc.burm : Debug/Sparc.burg.in1
-       $(CXX) -E -I$(LEVEL)/include $(DEBUG_FLAG) -x c++ $< | ${SED} '/^# /d' | ${SED} 's/Xinclude/#include/g' | ${SED} 's/Xdefine/#define/g' > $@
-
 $(BUILD_OBJ_DIR)/Depend/Sparc.burm.d: $(BUILD_OBJ_DIR)/Depend/.dir
        touch $@
 
-SparcV9CodeEmitter.cpp: SparcV9CodeEmitter.inc
-
-
 TARGET_NAME := SparcV9
 
-TABLEGEN_FILES := $(wildcard *.td)
+TABLEGEN_FILES := $(wildcard $(SourceDir)/*.td)
+
+$(SourceDir)/$(TARGET_NAME)CodeEmitter.cpp:: $(TARGET_NAME)CodeEmitter.inc
 
 $(TARGET_NAME)CodeEmitter.inc:: $(TABLEGEN_FILES) $(TBLGEN)
-       $(TBLGEN) $(TARGET_NAME).td -gen-emitter -o $@
+       $(TBLGEN) -I $(SourceDir) $(SourceDir)/$(TARGET_NAME).td -gen-emitter -o $@
 
 clean::
        ${RM} -f $(TARGET_NAME)CodeEmitter.inc
index a6bd3000d8530fa84294fe5def1b114f0303eb22..84d2e6d6a11a7eda796c6c58988ad8fa78b4250e 100644 (file)
@@ -8,22 +8,22 @@ $(SourceDepend): X86GenRegisterInfo.h.inc X86GenRegisterNames.inc \
                  X86GenInstrInfo.inc X86GenInstrSelector.inc
 
 X86GenRegisterNames.inc::  X86.td X86RegisterInfo.td ../Target.td $(TBLGEN)
-       $(TBLGEN) $< -gen-register-enums -o $@
+       $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-enums -o $@
 
 X86GenRegisterInfo.h.inc:: X86.td X86RegisterInfo.td ../Target.td $(TBLGEN)
-       $(TBLGEN) $< -gen-register-desc-header -o $@
+       $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-desc-header -o $@
 
 X86GenRegisterInfo.inc:: X86.td X86RegisterInfo.td ../Target.td $(TBLGEN)
-       $(TBLGEN) $< -gen-register-desc -o $@
+       $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-desc -o $@
 
 X86GenInstrNames.inc:: X86.td X86InstrInfo.td ../Target.td $(TBLGEN)
-       $(TBLGEN) $< -gen-instr-enums -o $@
+       $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-instr-enums -o $@
 
 X86GenInstrInfo.inc:: X86.td X86InstrInfo.td ../Target.td $(TBLGEN)
-       $(TBLGEN) $< -gen-instr-desc -o $@
+       $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-instr-desc -o $@
 
 X86GenInstrSelector.inc:: X86.td X86InstrInfo.td ../Target.td $(TBLGEN)
-       $(TBLGEN) $< -gen-instr-selector -o $@
+       $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-instr-selector -o $@
 
 clean::
        $(VERB) rm -f *.inc