aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-12-16 17:38:56 +0000
committerChris Lattner <sabre@nondot.org>2004-12-16 17:38:56 +0000
commit23ee79579dcb2860e04569b47e61482ef0ac8886 (patch)
tree5604c6d1175fae0a42d9e676dfce27bcd0bd1b19
parent02a4f90903db74a82d219f21358bf08191094efb (diff)
downloadexternal_llvm-23ee79579dcb2860e04569b47e61482ef0ac8886.zip
external_llvm-23ee79579dcb2860e04569b47e61482ef0ac8886.tar.gz
external_llvm-23ee79579dcb2860e04569b47e61482ef0ac8886.tar.bz2
Factor all of the .inc : .inc.tmp rules into one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18989 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--Makefile.rules46
1 files changed, 8 insertions, 38 deletions
diff --git a/Makefile.rules b/Makefile.rules
index 8efd3e3..f509058 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -956,85 +956,55 @@ INCTMPFiles := $(INCFiles:%=$(ObjDir)/%.tmp)
# All of these files depend on tblgen and the .td files.
$(INCTMPFiles) : $(TBLGEN) $(TDFiles)
+# INCFiles rule: All of the tblgen generated files are emitted to
+# $(ObjDir)/%.inc.tmp, instead of emitting them directly to %.inc. This allows
+# us to only "touch" the real file if the contents of it change. IOW, if
+# tblgen is modified, all of the .inc.tmp files are regereated, but no
+# dependencies of the .inc files are, unless the contents of the .inc file
+# changes.
+$(INCFiles) : %.inc : $(ObjDir)/%.inc.tmp
+ $(Verb) cmp -s $@ $< || cp $< $@
$(TARGET:%=$(ObjDir)/%GenRegisterNames.inc.tmp): \
$(ObjDir)/%GenRegisterNames.inc.tmp : %.td $(ObjDir)/.dir
$(Echo) "Building $(<F) register names with tblgen"
$(Verb) $(TableGen) -gen-register-enums -o $@ $<
-$(TARGET:%=%GenRegisterNames.inc): \
-%GenRegisterNames.inc : $(ObjDir)/%GenRegisterNames.inc.tmp
- $(Verb) cmp -s $@ $< || cp $< $@
-
-
$(TARGET:%=$(ObjDir)/%GenRegisterInfo.h.inc.tmp): \
$(ObjDir)/%GenRegisterInfo.h.inc.tmp : %.td $(ObjDir)/.dir
$(Echo) "Building $(<F) register information header with tblgen"
$(Verb) $(TableGen) -gen-register-desc-header -o $@ $<
-$(TARGET:%=%GenRegisterInfo.h.inc): \
-%GenRegisterInfo.h.inc : $(ObjDir)/%GenRegisterInfo.h.inc.tmp
- $(Verb) cmp -s $@ $< || cp $< $@
-
-
$(TARGET:%=$(ObjDir)/%GenRegisterInfo.inc.tmp): \
$(ObjDir)/%GenRegisterInfo.inc.tmp : %.td $(ObjDir)/.dir
$(Echo) "Building $(<F) register info implementation with tblgen"
$(Verb) $(TableGen) -gen-register-desc -o $@ $<
-$(TARGET:%=%GenRegisterInfo.inc): \
-%GenRegisterInfo.inc : $(ObjDir)/%GenRegisterInfo.inc.tmp
- $(Verb) cmp -s $@ $< || cp $< $@
-
-
$(TARGET:%=$(ObjDir)/%GenInstrNames.inc.tmp): \
$(ObjDir)/%GenInstrNames.inc.tmp : %.td $(ObjDir)/.dir
$(Echo) "Building $(<F) instruction names with tblgen"
$(Verb) $(TableGen) -gen-instr-enums -o $@ $<
-$(TARGET:%=%GenInstrNames.inc): \
-%GenInstrNames.inc : $(ObjDir)/%GenInstrNames.inc.tmp
- $(Verb) cmp -s $@ $< || cp $< $@
-
-
$(TARGET:%=$(ObjDir)/%GenInstrInfo.inc.tmp): \
$(ObjDir)/%GenInstrInfo.inc.tmp : %.td $(ObjDir)/.dir
$(Echo) "Building $(<F) instruction information with tblgen"
$(Verb) $(TableGen) -gen-instr-desc -o $@ $<
-$(TARGET:%=%GenInstrInfo.inc): \
-%GenInstrInfo.inc : $(ObjDir)/%GenInstrInfo.inc.tmp
- $(Verb) cmp -s $@ $< || cp $< $@
-
-
$(TARGET:%=$(ObjDir)/%GenAsmWriter.inc.tmp): \
$(ObjDir)/%GenAsmWriter.inc.tmp : %.td $(ObjDir)/.dir
$(Echo) "Building $(<F) assembly writer with tblgen"
$(Verb) $(TableGen) -gen-asm-writer -o $@ $<
-$(TARGET:%=%GenAsmWriter.inc): \
-%GenAsmWriter.inc : $(ObjDir)/%GenAsmWriter.inc.tmp
- $(Verb) cmp -s $@ $< || cp $< $@
-
$(TARGET:%=$(ObjDir)/%GenAsmWriter1.inc.tmp): \
$(ObjDir)/%GenAsmWriter1.inc.tmp : %.td $(ObjDir)/.dir
$(Echo) "Building $(<F) assembly writer #1 with tblgen"
$(Verb) $(TableGen) -gen-asm-writer -asmwriternum=1 -o $@ $<
-$(TARGET:%=%GenAsmWriter1.inc): \
-%GenAsmWriter1.inc : $(ObjDir)/%GenAsmWriter1.inc.tmp
- $(Verb) cmp -s $@ $< || cp $< $@
-
-
$(TARGET:%=$(ObjDir)/%GenCodeEmitter.inc.tmp): \
$(ObjDir)/%GenCodeEmitter.inc.tmp: %.td $(ObjDir)/.dir
$(Echo) "Building $(<F) code emitter with tblgen"
$(Verb) $(TableGen) -gen-emitter -o $@ $<
-$(TARGET:%=%GenCodeEmitter.inc): \
-%GenCodeEmitter.inc : $(ObjDir)/%GenCodeEmitter.inc.tmp
- $(Verb) cmp -s $@ $< || cp $< $@
-
clean-local::
-$(Verb) $(RM) -f $(INCFiles)