Don't run tests by default
[oota-llvm.git] / utils / Burg / Makefile
1 # $Id$
2
3 #CFLAGS =
4 #CFLAGS = -O
5 #CFLAGS = -O -DNOLEX
6 CFLAGS  = -g -DDEBUG
7 #CFLAGS = -g -DNOLEX -DDEBUG
8
9 SRCS = \
10         be.c \
11         burs.c \
12         closure.c \
13         delta.c \
14         fe.c \
15         item.c \
16         lex.c \
17         list.c \
18         main.c \
19         map.c \
20         nonterminal.c \
21         operator.c \
22         pattern.c \
23         plank.c \
24         queue.c \
25         rule.c \
26         string.c \
27         symtab.c \
28         table.c \
29         trim.c \
30         zalloc.c
31
32 BU_OBJS = \
33         burs.o \
34         closure.o \
35         delta.o \
36         item.o \
37         list.o \
38         map.o \
39         nonterminal.o \
40         operator.o \
41         pattern.o \
42         queue.o \
43         rule.o \
44         table.o \
45         trim.o \
46         zalloc.o
47
48 FE_OBJS = \
49         be.o \
50         fe.o \
51         lex.o \
52         main.o \
53         plank.o \
54         string.o \
55         symtab.o \
56         y.tab.o
57
58 burg: $(BU_OBJS) $(FE_OBJS)
59         $(CC) -o burg $(CFLAGS) $(BU_OBJS) $(FE_OBJS)
60
61 y.tab.c y.tab.h: gram.y
62         yacc -d gram.y
63
64 clean:
65         rm -f *.o y.tab.h y.tab.c core burg *.aux *.log *.dvi sample sample.c tmp
66
67 $(FE_OBJS):     b.h
68 $(BU_OBJS):     b.h
69 $(FE_OBJS):     fe.h
70
71 lex.o:  y.tab.h
72
73 doc.dvi: doc.tex
74         latex doc; latex doc
75
76 test: burg sample.gr
77         ./burg -I     <sample.gr   >sample.c && cc $(CFLAGS) -o sample sample.c && ./sample
78         ./burg -I      sample.gr   >tmp && cmp tmp sample.c
79         ./burg -I     <sample.gr -o tmp && cmp tmp sample.c
80         ./burg -I      sample.gr -o tmp && cmp tmp sample.c
81         ./burg -I -O0 <sample.gr   >tmp && cmp tmp sample.c
82         ./burg -I -=  <sample.gr   >tmp && cmp tmp sample.c