]> git.saurik.com Git - bison.git/blob - src/local.mk
POSIX: complain if %prec's token was not defined.
[bison.git] / src / local.mk
1 ## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
2 ## Free Software Foundation, Inc.
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
19 AM_CPPFLAGS += -I$(top_srcdir)/lib
20 # Find builddir/src/scan-code.c etc.
21 AM_CPPFLAGS += -I$(top_builddir)
22
23 LDADD = 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 BISON = tests/bison
28 YACC = $(BISON) -y
29 AM_YFLAGS = -dv --warnings=all,error --report=all
30
31 bin_PROGRAMS = src/bison
32 bin_SCRIPTS = $(YACC_SCRIPT)
33 EXTRA_SCRIPTS = src/yacc
34
35 src_bison_CFLAGS = $(AM_CFLAGS) $(WERROR_CFLAGS)
36 src_bison_SOURCES = \
37 src/AnnotationList.c \
38 src/AnnotationList.h \
39 src/InadequacyList.c \
40 src/InadequacyList.h \
41 src/LR0.c \
42 src/LR0.h \
43 src/Sbitset.c \
44 src/Sbitset.h \
45 src/assoc.c \
46 src/assoc.h \
47 src/closure.c \
48 src/closure.h \
49 src/complain.c \
50 src/complain.h \
51 src/conflicts.c \
52 src/conflicts.h \
53 src/derives.c \
54 src/derives.h \
55 src/files.c \
56 src/files.h \
57 src/flex-scanner.h \
58 src/getargs.c \
59 src/getargs.h \
60 src/gram.c \
61 src/gram.h \
62 src/graphviz.c \
63 src/graphviz.h \
64 src/lalr.c \
65 src/lalr.h \
66 src/ielr.c \
67 src/ielr.h \
68 src/location.c \
69 src/location.h \
70 src/main.c \
71 src/muscle-tab.c \
72 src/muscle-tab.h \
73 src/named-ref.c \
74 src/named-ref.h \
75 src/nullable.c \
76 src/nullable.h \
77 src/output.c \
78 src/output.h \
79 src/parse-gram.h \
80 src/parse-gram.y \
81 src/print-xml.c \
82 src/print-xml.h \
83 src/print.c \
84 src/print.h \
85 src/print_graph.c \
86 src/print_graph.h \
87 src/reader.c \
88 src/reader.h \
89 src/reduce.c \
90 src/reduce.h \
91 src/relation.c \
92 src/relation.h \
93 src/scan-code-c.c \
94 src/scan-code.h \
95 src/scan-gram-c.c \
96 src/scan-gram.h \
97 src/scan-skel-c.c \
98 src/scan-skel.h \
99 src/state.c \
100 src/state.h \
101 src/symlist.c \
102 src/symlist.h \
103 src/symtab.c \
104 src/symtab.h \
105 src/system.h \
106 src/tables.c \
107 src/tables.h \
108 src/uniqstr.c \
109 src/uniqstr.h
110
111 EXTRA_src_bison_SOURCES = \
112 src/scan-code.l \
113 src/scan-gram.l \
114 src/scan-skel.l
115
116 BUILT_SOURCES += \
117 src/parse-gram.c \
118 src/parse-gram.h \
119 src/scan-code.c \
120 src/scan-gram.c \
121 src/scan-skel.c
122
123 MOSTLYCLEANFILES += src/yacc
124
125 src/yacc:
126 rm -f $@ $@.tmp
127 echo '#! /bin/sh' >$@.tmp
128 echo "exec '$(bindir)/bison' -y "'"$$@"' >>$@.tmp
129 chmod a+x $@.tmp
130 mv $@.tmp $@