Finish the matcher!
[oota-llvm.git] / utils / TableGen / Makefile
1 LEVEL = ../..
2 TOOLNAME = tblgen
3 USEDLIBS = support.a
4
5 .PRECIOUS: FileLexer.cpp FileParser.cpp
6
7 include $(LEVEL)/Makefile.common
8
9 #
10 # Make the source file depend on the header file.  In this way, dependencies
11 # (which depend on the source file) won't get generated until bison is done
12 # generating the C source and header files for the parser.
13 #
14 FileLexer.cpp: FileParser.h
15
16 clean::
17         -rm -f FileParser.cpp FileParser.h FileLexer.cpp CommandLine.cpp
18         -rm -f FileParser.output
19
20
21 dump:: $(TOOLEXENAME_G)
22         $(TOOLEXENAME_G) < X86.td
23
24 parse: $(TOOLEXENAME_G)
25         $(TOOLEXENAME_G) < X86.td -parse
26
27 test:: $(TOOLEXENAME_G)
28         @echo "enum {"
29         @$(TOOLEXENAME_G) < X86.td -class=Register
30         @echo 
31         @echo "};"
32
33         @echo "enum {"
34         @$(TOOLEXENAME_G) < X86.td -class=Instruction
35         @echo 
36         @echo "};"