summaryrefslogtreecommitdiff
path: root/utils/Burg/Makefile
blob: a70f2eaaf9c03c60bef051c81f9e7d0e8bd8c50c (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
# $Id$
LEVEL = ../..
TOOLNAME = burg
EXTRASOURCES = gram.tab.c

include $(LEVEL)/Makefile.common

gram.tab.c gram.tab.h: gram.yc
	$(VERB) $(BISON) -d $<
	$(VERB) mv -f gram.tab.cc gram.tab.c
	$(VERB) mv -f gram.tab.hc gram.tab.h

clean::
	rm -ff y.tab.h y.tab.c core *.aux *.log *.dvi sample sample.c tmp

$(FE_OBJS):	b.h
$(BU_OBJS):	b.h
$(FE_OBJS):	fe.h

$(BUILD_ROOT)/Release/lex.o $(BUILD_ROOT)/Profile/lex.o $(BUILD_ROOT)/Debug/lex.o: gram.tab.h

doc.dvi: doc.tex
	latex doc; latex doc


test: $(TOOLEXENAME_G) sample.gr
	$(TOOLEXENAME_G) -I     <sample.gr   >sample.c && $(CC) $(CFLAGS) -o sample sample.c && ./sample
	$(TOOLEXENAME_G) -I      sample.gr   >tmp && cmp tmp sample.c
	$(TOOLEXENAME_G) -I     <sample.gr -o tmp && cmp tmp sample.c
	$(TOOLEXENAME_G) -I      sample.gr -o tmp && cmp tmp sample.c
	$(TOOLEXENAME_G) -I -O0 <sample.gr   >tmp && cmp tmp sample.c
	$(TOOLEXENAME_G) -I -=  <sample.gr   >tmp && cmp tmp sample.c