summaryrefslogtreecommitdiff
path: root/support/tools/TableGen/Makefile
blob: 98417d2b755c66713f6ad0e6519e0e9617642994 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
LEVEL = ../..
TOOLNAME = tblgen
USEDLIBS = support.a

.PRECIOUS: FileLexer.cpp FileParser.cpp

include $(LEVEL)/Makefile.common

#
# Make the source file depend on the header file.  In this way, dependencies
# (which depend on the source file) won't get generated until bison is done
# generating the C source and header files for the parser.
#
FileLexer.cpp: FileParser.h

clean::
	-rm -f FileParser.cpp FileParser.h FileLexer.cpp CommandLine.cpp
	-rm -f FileParser.output


dump:: $(TOOLEXENAME_G)
	$(TOOLEXENAME_G) < X86.td

parse: $(TOOLEXENAME_G)
	$(TOOLEXENAME_G) < X86.td -parse

test:: $(TOOLEXENAME_G)
	@echo "enum {"
	@$(TOOLEXENAME_G) < X86.td -class=Register
	@echo 
	@echo "};"

	@echo "enum {"
	@$(TOOLEXENAME_G) < X86.td -class=Instruction
	@echo 
	@echo "};"