[llvm-commits] CVS: llvm/lib/Target/Sparc/Makefile
Chris Lattner
lattner at cs.uiuc.edu
Wed Jul 30 00:50:02 PDT 2003
Changes in directory llvm/lib/Target/Sparc:
Makefile updated: 1.25 -> 1.26
---
Log message:
Only regenerate the .inc file if IT has changed, not just if the .td files
have changed.
---
Diffs of the changes:
Index: llvm/lib/Target/Sparc/Makefile
diff -u llvm/lib/Target/Sparc/Makefile:1.25 llvm/lib/Target/Sparc/Makefile:1.26
--- llvm/lib/Target/Sparc/Makefile:1.25 Tue Jul 29 18:04:41 2003
+++ llvm/lib/Target/Sparc/Makefile Wed Jul 30 00:49:17 2003
@@ -43,9 +43,18 @@
SparcV9CodeEmitter.cpp: SparcV9CodeEmitter.inc
-SparcV9CodeEmitter.inc: SparcV9.td SparcV9_F2.td SparcV9_F3.td SparcV9_F4.td SparcV9_Reg.td $(TBLGEN)
- @${ECHO} "TableGen-erating $@"
- $(CC) -E -xc -P SparcV9.td | $(TBLGEN) -gen-emitter -o $@
+
+TARGET_NAME := SparcV9
+
+TABLEGEN_FILES := $(wildcard *.td)
+
+$(TARGET_NAME)CodeEmitter.inc.tmp: $(TABLEGEN_FILES) $(TBLGEN)
+ @${ECHO} "TableGen-erating " $(TARGET_NAME)
+ $(CC) -E -xc -P $(TARGET_NAME).td | $(TBLGEN) -gen-emitter -o $@
+
+$(TARGET_NAME)CodeEmitter.inc: $(TARGET_NAME)CodeEmitter.inc.tmp
+ $(VERB) # Only copy over the real .inc file if it has changed!
+ $(VERB) diff $@ $< > /dev/null || cp $< $@
clean::
- ${RM} -f SparcV9CodeEmitter.inc
+ ${RM} -f $(TARGET_NAME)CodeEmitter.inc $(TARGET_NAME)CodeEmitter.inc.tmp
More information about the llvm-commits
mailing list