]> git.saurik.com Git - bison.git/blob - Makefile.am
8f00e6033b0186f002b2ba27a2f2f28320592716
[bison.git] / Makefile.am
1 ## Process this file with automake to produce Makefile.in.
2
3 ## Copyright (C) 2001-2012 Free Software Foundation, Inc.
4
5 ## This program is free software: you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation, either version 3 of the License, or
8 ## (at your option) any later version.
9 ##
10 ## This program is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ## GNU General Public License for more details.
14 ##
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 AUTOMAKE_OPTIONS = subdir-objects
19 ACLOCAL_AMFLAGS = -I m4
20
21 SUBDIRS = po runtime-po .
22
23 # Files installed for use by Automake.
24 aclocaldir = @aclocaldir@
25 aclocal_DATA = m4/bison-i18n.m4
26
27 EXTRA_DIST = .prev-version .version \
28 cfg.mk ChangeLog-1998 ChangeLog-2012 PACKAGING
29
30 ## Running the bison from this tarball. To generate our own parser,
31 ## but also to run the tests. Of course, you ought to keep a sane
32 ## version of Bison nearby...
33 BISON = $(top_builddir)/tests/bison
34 BISON_IN = $(top_srcdir)/tests/bison.in
35 YACC = $(BISON) -y
36 AM_YFLAGS = -d -v --warnings=all,error --report=all
37
38 # Initialization before completion by local.mk's.
39 AM_CFLAGS = $(WARN_CFLAGS)
40 # Find builddir/src/scan-code.c etc.
41 AM_CPPFLAGS = -I. -Ilib -I$(top_srcdir) -I$(top_srcdir)/lib
42 BUILT_SOURCES =
43 DISTCLEANFILES =
44 MOSTLYCLEANFILES =
45 SUFFIXES =
46 noinst_LIBRARIES =
47 MOSTLYCLEANDIRS =
48
49 include build-aux/local.mk
50 include data/local.mk
51 include djgpp/local.mk
52 include doc/local.mk
53 include etc/local.mk
54 include examples/local.mk
55 include lib/local.mk
56 include src/local.mk
57 include tests/local.mk
58
59 # See comments in build-aux/git-version-gen. However, we make .version depend
60 # on configure so that .version and VERSION/PACKAGE_VERSION stay in sync in the
61 # working copy (for example, when you run autoreconf && make). Allowing these
62 # to fall out of sync appears to have little potential to improve Bison build
63 # efficiency (even if we were to replace VERSION/PACKAGE_VERSION with .version
64 # everywhere possible). On the other hand, it could be harmful. For example,
65 # a developer might naively reference .version in a test case while the bison
66 # executable still compiles with VERSION, and so the test case might fail or
67 # pass incorrectly.
68 BUILT_SOURCES += $(top_srcdir)/.version
69 $(top_srcdir)/.version: configure
70 echo $(VERSION) > $@-t && mv $@-t $@
71 dist-hook: gen-ChangeLog
72 echo $(VERSION) > $(distdir)/.tarball-version
73
74 .PHONY: update-b4-copyright update-package-copyright-year
75 update-b4-copyright:
76 find data -type f \
77 | grep -v -E '^data/bison.m4$$' \
78 | xargs $(build_aux)/$@
79 @echo 'warning: src/parse-gram.[hc] may need to be regenerated.'
80 update-package-copyright-year:
81 $(build_aux)/$@ configure.ac
82
83 gen_start_date = 2012-01-16
84 .PHONY: gen-ChangeLog
85 gen-ChangeLog:
86 $(AM_V_GEN)if test -d .git; then \
87 $(top_srcdir)/build-aux/gitlog-to-changelog \
88 --no-cluster \
89 --amend=$(srcdir)/build-aux/git-log-fix \
90 --since=$(gen_start_date) > $(distdir)/cl-t; \
91 rm -f $(distdir)/ChangeLog; \
92 mv $(distdir)/cl-t $(distdir)/ChangeLog; \
93 fi