[llvm-commits] CVS: llvm/lib/Target/Sparc/Makefile

John Criswell criswell at cs.uiuc.edu
Tue Sep 9 15:58:07 PDT 2003


Changes in directory llvm/lib/Target/Sparc:

Makefile updated: 1.30 -> 1.31

---
Log message:

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.



---
Diffs of the changes:

Index: llvm/lib/Target/Sparc/Makefile
diff -u llvm/lib/Target/Sparc/Makefile:1.30 llvm/lib/Target/Sparc/Makefile:1.31
--- llvm/lib/Target/Sparc/Makefile:1.30	Sat Sep  6 09:50:07 2003
+++ llvm/lib/Target/Sparc/Makefile	Tue Sep  9 15:56:59 2003
@@ -1,7 +1,7 @@
 LEVEL = ../../..
 LIBRARYNAME = sparc
 
-ExtraSource = Debug/Sparc.burm.cpp 
+ExtraSource = Sparc.burm.cpp 
 
 include $(LEVEL)/Makefile.common
 
@@ -11,22 +11,23 @@
   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 @@
 
 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
+





More information about the llvm-commits mailing list