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