]>
Commit | Line | Data |
---|---|---|
11c073b7 AD |
1 | ## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 |
2 | ## Free Software Foundation, Inc. | |
0305d25e AD |
3 | |
4 | ## This program is free software: you can redistribute it and/or modify | |
5 | ## it under the terms of the GNU General Public License as published by | |
6 | ## the Free Software Foundation, either version 3 of the License, or | |
7 | ## (at your option) any later version. | |
8 | ## | |
9 | ## This program is distributed in the hope that it will be useful, | |
10 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | ## GNU General Public License for more details. | |
13 | ## | |
14 | ## You should have received a copy of the GNU General Public License | |
15 | ## along with this program. If not, see <http://www.gnu.org/licenses/>. | |
16 | ||
17 | AUTOMAKE_OPTIONS = subdir-objects | |
18 | ||
feda5527 | 19 | AM_CPPFLAGS += -I$(top_srcdir)/lib |
0305d25e AD |
20 | # Find builddir/src/scan-code.c etc. |
21 | AM_CPPFLAGS += -I$(top_builddir) | |
22 | ||
0305d25e AD |
23 | LDADD = $(top_builddir)/lib/libbison.a $(LIBINTL) |
24 | ||
25 | # Use our own Bison to build the parser. Of course, you ought to | |
26 | # keep a sane version of Bison nearby... | |
27 | YACC = $(top_builddir)/tests/bison -y | |
28 | AM_YFLAGS = -dv --warnings=all,error --report=all | |
29 | ||
30 | bin_PROGRAMS = src/bison | |
31 | bin_SCRIPTS = $(YACC_SCRIPT) | |
32 | EXTRA_SCRIPTS = src/yacc | |
33 | ||
e021191b | 34 | src_bison_CFLAGS = $(AM_CFLAGS) $(WERROR_CFLAGS) |
0305d25e AD |
35 | src_bison_SOURCES = \ |
36 | src/LR0.c \ | |
37 | src/LR0.h \ | |
38 | src/assoc.c \ | |
39 | src/assoc.h \ | |
40 | src/closure.c \ | |
41 | src/closure.h \ | |
42 | src/complain.c \ | |
43 | src/complain.h \ | |
44 | src/conflicts.c \ | |
45 | src/conflicts.h \ | |
46 | src/derives.c \ | |
47 | src/derives.h \ | |
48 | src/files.c \ | |
49 | src/files.h \ | |
50 | src/flex-scanner.h \ | |
51 | src/getargs.c \ | |
52 | src/getargs.h \ | |
53 | src/gram.c \ | |
54 | src/gram.h \ | |
55 | src/graphviz.c \ | |
56 | src/graphviz.h \ | |
57 | src/lalr.c \ | |
58 | src/lalr.h \ | |
59 | src/location.c \ | |
60 | src/location.h \ | |
61 | src/main.c \ | |
62 | src/muscle_tab.c \ | |
63 | src/muscle_tab.h \ | |
64 | src/nullable.c \ | |
65 | src/nullable.h \ | |
66 | src/output.c \ | |
67 | src/output.h \ | |
68 | src/parse-gram.h \ | |
69 | src/parse-gram.y \ | |
70 | src/print-xml.c \ | |
71 | src/print-xml.h \ | |
72 | src/print.c \ | |
73 | src/print.h \ | |
74 | src/print_graph.c \ | |
75 | src/print_graph.h \ | |
76 | src/reader.c \ | |
77 | src/reader.h \ | |
78 | src/reduce.c \ | |
79 | src/reduce.h \ | |
80 | src/relation.c \ | |
81 | src/relation.h \ | |
82 | src/scan-code-c.c \ | |
83 | src/scan-code.h \ | |
84 | src/scan-gram-c.c \ | |
85 | src/scan-gram.h \ | |
86 | src/scan-skel-c.c \ | |
87 | src/scan-skel.h \ | |
88 | src/state.c \ | |
89 | src/state.h \ | |
90 | src/symlist.c \ | |
91 | src/symlist.h \ | |
92 | src/symtab.c \ | |
93 | src/symtab.h \ | |
94 | src/system.h \ | |
95 | src/tables.c \ | |
96 | src/tables.h \ | |
97 | src/uniqstr.c \ | |
98 | src/uniqstr.h | |
99 | ||
100 | EXTRA_src_bison_SOURCES = \ | |
101 | src/scan-code.l \ | |
102 | src/scan-gram.l \ | |
103 | src/scan-skel.l | |
104 | ||
105 | BUILT_SOURCES += \ | |
106 | src/parse-gram.c \ | |
107 | src/parse-gram.h \ | |
108 | src/scan-code.c \ | |
109 | src/scan-gram.c \ | |
110 | src/scan-skel.c | |
111 | ||
e2c2f696 | 112 | MOSTLYCLEANFILES += src/yacc |
0305d25e AD |
113 | |
114 | src/yacc: | |
115 | rm -f $@ $@.tmp | |
116 | echo '#! /bin/sh' >$@.tmp | |
117 | echo "exec '$(bindir)/bison' -y "'"$$@"' >>$@.tmp | |
118 | chmod a+x $@.tmp | |
119 | mv $@.tmp $@ |