Only regenerate the .inc file if IT has changed, not just if the .td files

have changed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7414 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-07-30 05:49:17 +00:00
parent 7db1fa9802
commit b4d3f46ba2

View File

@ -43,9 +43,18 @@ $(BUILD_OBJ_DIR)/Depend/Sparc.burm.d: $(BUILD_OBJ_DIR)/Depend/.dir
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