]> git.saurik.com Git - bison.git/blame - Makefile.am
build: avoid infinite recursions on include_next
[bison.git] / Makefile.am
CommitLineData
7726724a 1## Process this file with automake to produce Makefile.in.
7d424de1 2
3209eb1c 3# Copyright (C) 2001-2015 Free Software Foundation, Inc.
2a559307
AD
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/>.
2c8a9dfa 17
7726724a 18AUTOMAKE_OPTIONS = subdir-objects
cc13ba4d 19ACLOCAL_AMFLAGS = -I m4
8c44d3ec 20
feda5527 21SUBDIRS = po runtime-po .
f7ab6a50
PE
22
23# Files installed for use by Automake.
24aclocaldir = @aclocaldir@
25aclocal_DATA = m4/bison-i18n.m4
bbcb769c 26
85d57e27
AD
27EXTRA_DIST = .prev-version .version cfg.mk PACKAGING \
28 ChangeLog-1998 ChangeLog-2012 ChangeLog
29
30dist_doc_DATA = AUTHORS COPYING NEWS README THANKS TODO
fb32e373 31
360ae94e 32## Running the bison from this tarball. To generate our own parser,
7726724a
AD
33## but also to run the tests. Of course, you ought to keep a sane
34## version of Bison nearby...
360ae94e
AD
35BISON = $(top_builddir)/tests/bison
36BISON_IN = $(top_srcdir)/tests/bison.in
f1526426
AD
37YACC = $(BISON) -o y.tab.c
38AM_YFLAGS = -d -v -Werror -Wall -Wno-yacc --report=all
360ae94e 39
0305d25e 40# Initialization before completion by local.mk's.
e021191b 41AM_CFLAGS = $(WARN_CFLAGS)
0ab29b7c
AD
42# Find builddir/src/scan-code.c etc. For some reason "-I./lib"
43# instead of "-Ilib" avoids infinite recursions on #include_next.
44AM_CPPFLAGS = -I. -I./lib -I$(top_srcdir) -I$(top_srcdir)/lib
0305d25e 45BUILT_SOURCES =
ed0e63dc 46CLEANFILES =
d4977ce3 47DISTCLEANFILES =
59fba180 48EXTRA_DIST += $(dist_TESTS)
2e4986a8 49MOSTLYCLEANDIRS =
e2c2f696 50MOSTLYCLEANFILES =
9f14e187 51SUFFIXES =
59fba180 52TESTS = $(dist_TESTS)
2e4986a8 53check_PROGRAMS =
59fba180 54dist_TESTS =
85ad742d 55noinst_LIBRARIES =
85ad742d 56
9a1e4214 57include build-aux/local.mk
6a5aa0cd 58include data/local.mk
36415906 59include djgpp/local.mk
e2c2f696 60include doc/local.mk
7cb794dc 61include etc/local.mk
cd409e3b 62include examples/local.mk
feda5527 63include lib/local.mk
0305d25e 64include src/local.mk
d4977ce3 65include tests/local.mk
8fa36911 66
8dce3875
JD
67# See comments in build-aux/git-version-gen. However, we make .version depend
68# on configure so that .version and VERSION/PACKAGE_VERSION stay in sync in the
69# working copy (for example, when you run autoreconf && make). Allowing these
70# to fall out of sync appears to have little potential to improve Bison build
71# efficiency (even if we were to replace VERSION/PACKAGE_VERSION with .version
72# everywhere possible). On the other hand, it could be harmful. For example,
73# a developer might naively reference .version in a test case while the bison
74# executable still compiles with VERSION, and so the test case might fail or
75# pass incorrectly.
0305d25e 76BUILT_SOURCES += $(top_srcdir)/.version
8dce3875 77$(top_srcdir)/.version: configure
8fa36911 78 echo $(VERSION) > $@-t && mv $@-t $@
5ef4a3c7 79dist-hook: gen-ChangeLog
8fa36911 80 echo $(VERSION) > $(distdir)/.tarball-version
269e222e 81
80b70223 82.PHONY: update-b4-copyright update-package-copyright-year
269e222e 83update-b4-copyright:
42bcf1ce 84 $(AM_V_GEN)find $(srcdir)/data -type f \
f6df83b4 85 | xargs $(srcdir)/build-aux/$@
269e222e 86 @echo 'warning: src/parse-gram.[hc] may need to be regenerated.'
80b70223 87update-package-copyright-year:
42bcf1ce 88 $(AM_V_GEN)$(srcdir)/build-aux/$@ $(srcdir)/configure.ac
5ef4a3c7
JM
89
90gen_start_date = 2012-01-16
91.PHONY: gen-ChangeLog
92gen-ChangeLog:
813f7d34
AD
93 $(AM_V_GEN)if test -d $(srcdir)/.git; then \
94 cl=$(distdir)/ChangeLog && \
95 rm -f $$cl.tmp && \
96 $(top_srcdir)/build-aux/gitlog-to-changelog \
97 --strip-tab \
98 --strip-cherry-pick \
99 --no-cluster \
100 --amend=$(srcdir)/build-aux/git-log-fix \
ae63f0e8 101 --srcdir=$(srcdir) \
813f7d34
AD
102 --since=$(gen_start_date) > $$cl.tmp && \
103 mv -f $$cl.tmp $$cl; \
5ef4a3c7 104 fi