]> git.saurik.com Git - bison.git/blob - Makefile.am
style: tests: simplify the handling of some C++ tests
[bison.git] / Makefile.am
1 ## Process this file with automake to produce Makefile.in.
2
3 # Copyright (C) 2001-2015 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 cfg.mk PACKAGING \
28 ChangeLog-1998 ChangeLog-2012 ChangeLog
29
30 dist_doc_DATA = AUTHORS COPYING NEWS README THANKS TODO
31
32 ## Running the bison from this tarball. To generate our own parser,
33 ## but also to run the tests. Of course, you ought to keep a sane
34 ## version of Bison nearby...
35 BISON = $(top_builddir)/tests/bison
36 BISON_IN = $(top_srcdir)/tests/bison.in
37 YACC = $(BISON) -o y.tab.c
38 AM_YFLAGS = -d -v -Werror -Wall -Wno-yacc --report=all
39
40 # Initialization before completion by local.mk's.
41 AM_CFLAGS = $(WARN_CFLAGS)
42 # Find builddir/src/scan-code.c etc.
43 AM_CPPFLAGS = -I. -Ilib -I$(top_srcdir) -I$(top_srcdir)/lib
44 BUILT_SOURCES =
45 CLEANFILES =
46 DISTCLEANFILES =
47 EXTRA_DIST += $(dist_TESTS)
48 MOSTLYCLEANDIRS =
49 MOSTLYCLEANFILES =
50 SUFFIXES =
51 TESTS = $(dist_TESTS)
52 check_PROGRAMS =
53 dist_TESTS =
54 noinst_LIBRARIES =
55
56 include build-aux/local.mk
57 include data/local.mk
58 include djgpp/local.mk
59 include doc/local.mk
60 include etc/local.mk
61 include examples/local.mk
62 include lib/local.mk
63 include src/local.mk
64 include tests/local.mk
65
66 # See comments in build-aux/git-version-gen. However, we make .version depend
67 # on configure so that .version and VERSION/PACKAGE_VERSION stay in sync in the
68 # working copy (for example, when you run autoreconf && make). Allowing these
69 # to fall out of sync appears to have little potential to improve Bison build
70 # efficiency (even if we were to replace VERSION/PACKAGE_VERSION with .version
71 # everywhere possible). On the other hand, it could be harmful. For example,
72 # a developer might naively reference .version in a test case while the bison
73 # executable still compiles with VERSION, and so the test case might fail or
74 # pass incorrectly.
75 BUILT_SOURCES += $(top_srcdir)/.version
76 $(top_srcdir)/.version: configure
77 echo $(VERSION) > $@-t && mv $@-t $@
78 dist-hook: gen-ChangeLog
79 echo $(VERSION) > $(distdir)/.tarball-version
80
81 .PHONY: update-b4-copyright update-package-copyright-year
82 update-b4-copyright:
83 $(AM_V_GEN)find $(srcdir)/data -type f \
84 | xargs $(srcdir)/build-aux/$@
85 @echo 'warning: src/parse-gram.[hc] may need to be regenerated.'
86 update-package-copyright-year:
87 $(AM_V_GEN)$(srcdir)/build-aux/$@ $(srcdir)/configure.ac
88
89 gen_start_date = 2012-01-16
90 .PHONY: gen-ChangeLog
91 gen-ChangeLog:
92 $(AM_V_GEN)if test -d $(srcdir)/.git; then \
93 cl=$(distdir)/ChangeLog && \
94 rm -f $$cl.tmp && \
95 $(top_srcdir)/build-aux/gitlog-to-changelog \
96 --strip-tab \
97 --strip-cherry-pick \
98 --no-cluster \
99 --amend=$(srcdir)/build-aux/git-log-fix \
100 --srcdir=$(srcdir) \
101 --since=$(gen_start_date) > $$cl.tmp && \
102 mv -f $$cl.tmp $$cl; \
103 fi