Work better with other versions of bison
[oota-llvm.git] / utils / Burg / Makefile
1 # $Id$
2 LEVEL = ../..
3 TOOLNAME = burg
4 EXTRASOURCES = gram.tab.c
5
6 include $(LEVEL)/Makefile.common
7
8 gram.tab.c gram.tab.h: gram.yc
9         $(VERB) $(BISON) -o gram.tab.c -d $<
10
11 clean::
12         rm -ff gram.tab.h gram.tab.c core* *.aux *.log *.dvi sample sample.c tmp
13
14 $(BUILD_ROOT)/Release/lex.o $(BUILD_ROOT)/Profile/lex.o $(BUILD_ROOT)/Debug/lex.o: gram.tab.h
15
16 doc.dvi: doc.tex
17         latex doc; latex doc
18
19
20 test: $(TOOLEXENAME_G) sample.gr
21         $(TOOLEXENAME_G) -I     <sample.gr   >sample.c && $(CC) $(CFLAGS) -o sample sample.c && ./sample
22         $(TOOLEXENAME_G) -I      sample.gr   >tmp && cmp tmp sample.c
23         $(TOOLEXENAME_G) -I     <sample.gr -o tmp && cmp tmp sample.c
24         $(TOOLEXENAME_G) -I      sample.gr -o tmp && cmp tmp sample.c
25         $(TOOLEXENAME_G) -I -O0 <sample.gr   >tmp && cmp tmp sample.c
26         $(TOOLEXENAME_G) -I -=  <sample.gr   >tmp && cmp tmp sample.c