Skip to content

Commit 7d41ed5

Browse files
committed
Simplify makefile by combining all TableGen dependencies into one variable
llvm-svn: 15527
1 parent c764718 commit 7d41ed5

File tree

1 file changed

+15
-22
lines changed

1 file changed

+15
-22
lines changed

llvm/lib/Target/PowerPC/Makefile

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,41 +10,34 @@ LEVEL = ../../..
1010
LIBRARYNAME = powerpc
1111
include $(LEVEL)/Makefile.common
1212

13+
TARGET = PowerPC
14+
1315
# Make sure that tblgen is run, first thing.
1416
$(SourceDepend): PowerPCGenRegisterInfo.h.inc PowerPCGenRegisterNames.inc \
1517
PowerPCGenRegisterInfo.inc PowerPCGenInstrNames.inc \
1618
PowerPCGenInstrInfo.inc
1719

18-
PowerPCGenRegisterNames.inc:: $(SourceDir)/PowerPC.td \
19-
$(SourceDir)/PowerPCRegisterInfo.td \
20-
$(SourceDir)/../Target.td $(TBLGEN)
21-
@echo "Building PowerPC.td register names with tblgen"
20+
TDFILES = $(SourceDir)/$(TARGET).td $(wildcard $(SourceDir)/*.td) \
21+
$(SourceDir)/../Target.td
22+
23+
$(TARGET)GenRegisterNames.inc:: $(TDFILES) $(TBLGEN)
24+
@echo "Building $(TARGET).td register names with tblgen"
2225
$(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-enums -o $@
2326

24-
PowerPCGenRegisterInfo.h.inc:: $(SourceDir)/PowerPC.td \
25-
$(SourceDir)/PowerPCRegisterInfo.td \
26-
$(SourceDir)/../Target.td $(TBLGEN)
27-
@echo "Building PowerPC.td register information header with tblgen"
27+
$(TARGET)GenRegisterInfo.h.inc:: $(TDFILES) $(TBLGEN)
28+
@echo "Building $(TARGET).td register information header with tblgen"
2829
$(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-desc-header -o $@
2930

30-
PowerPCGenRegisterInfo.inc:: $(SourceDir)/PowerPC.td \
31-
$(SourceDir)/PowerPCRegisterInfo.td \
32-
$(SourceDir)/../Target.td $(TBLGEN)
33-
@echo "Building PowerPC.td register information implementation with tblgen"
31+
$(TARGET)GenRegisterInfo.inc:: $(TDFILES) $(TBLGEN)
32+
@echo "Building $(TARGET).td register information implementation with tblgen"
3433
$(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-desc -o $@
3534

36-
PowerPCGenInstrNames.inc:: $(SourceDir)/PowerPC.td \
37-
$(SourceDir)/PowerPCInstrInfo.td \
38-
$(SourceDir)/PowerPCInstrFormats.td \
39-
$(SourceDir)/../Target.td $(TBLGEN)
40-
@echo "Building PowerPC.td instruction names with tblgen"
35+
$(TARGET)GenInstrNames.inc:: $(TDFILES) $(TBLGEN)
36+
@echo "Building $(TARGET).td instruction names with tblgen"
4137
$(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-instr-enums -o $@
4238

43-
PowerPCGenInstrInfo.inc:: $(SourceDir)/PowerPC.td \
44-
$(SourceDir)/PowerPCInstrInfo.td \
45-
$(SourceDir)/PowerPCInstrFormats.td \
46-
$(SourceDir)/../Target.td $(TBLGEN)
47-
@echo "Building PowerPC.td instruction information with tblgen"
39+
$(TARGET)GenInstrInfo.inc:: $(TDFILES) $(TBLGEN)
40+
@echo "Building $(TARGET).td instruction information with tblgen"
4841
$(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-instr-desc -o $@
4942

5043
clean::

0 commit comments

Comments
 (0)