1 ## Process this file with automake to produce Makefile.in -*-Makefile-*-
3 ## Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010
4 ## Free Software Foundation, Inc.
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 AM_MAKEINFOFLAGS = --no-split
20 info_TEXINFOS = bison.texinfo
21 bison_TEXINFOS = $(srcdir)/cross-options.texi gpl-3.0.texi fdl.texi
23 CLEANFILES = bison.fns
28 CROSS_OPTIONS_PL = $(top_srcdir)/build-aux/cross-options.pl
29 $(srcdir)/cross-options.texi: $(top_srcdir)/src/getargs.c $(CROSS_OPTIONS_PL)
30 mv -f $@ $@~ || : >$@~
32 cd $(top_builddir)/src && $(MAKE) $(AM_MAKEFLAGS) bison
33 $(top_builddir)/src/bison --help \
34 | perl $(CROSS_OPTIONS_PL) $(top_srcdir)/src/scan-gram.l >$@.tmp
35 diff -u $@~ $@.tmp || true
37 MAINTAINERCLEANFILES = $(srcdir)/cross-options.texi
43 EXTRA_DIST = refcard.tex
44 CLEANFILES += refcard.dvi refcard.log refcard.ps
46 refcard.dvi: refcard.tex
49 refcard.ps: refcard.dvi
56 dist_man_MANS = $(srcdir)/bison.1
58 EXTRA_DIST += $(dist_man_MANS:.1=.x) common.x
59 MAINTAINERCLEANFILES += $(dist_man_MANS)
61 # Depend on configure to get version number changes.
62 common_dep = $(top_srcdir)/configure $(srcdir)/common.x
63 srcsrcdir = $(top_srcdir)/bin
64 $(srcdir)/bison.1: $(common_dep) $(top_srcdir)/src/getargs.c
66 # Differences to ignore when comparing the man page (the date).
68 sed 's/^\(\.TH[^"]*"[^"]*"[^"]*\)"[^"]*"/\1/'
70 MOSTLYCLEANFILES = $(srcdir)/*.t
74 PREPATH = $(top_builddir)/src
76 @program=`expr "/$*" : '.*/\(.*\)'` && \
78 IFS=$(PATH_SEPARATOR); \
79 for dir in $(PREPATH); do \
81 echo cd $$dir '&&' $(MAKE) $(AM_MAKEFLAGS) $$program && \
82 (cd $$dir && $(MAKE) $(AM_MAKEFLAGS) $$program) || exit; \
84 @echo "Updating man page $@"
85 PATH="$(PREPATH)$(PATH_SEPARATOR)$$PATH"; \
89 --include=$(srcdir)/common.x \
90 --output=$@.t `echo '$*' | sed 's,.*/,,'`
91 if $(remove_time_stamp) $@ >$@a.t 2>/dev/null && \
92 $(remove_time_stamp) $@.t | cmp $@a.t - >/dev/null 2>&1; then \
99 nodist_man_MANS = yacc.1
114 edit = sed -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
115 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
116 -e 's,@top_builddir\@,$(top_builddir),g' \
117 -e 's,@top_srcdir\@,$(top_srcdir),g'
119 EXTRA_DIST += Doxyfile.in
120 CLEANFILES += Doxyfile
121 # Sed is used to generate Doxyfile from Doxyfile.in instead of
122 # configure, because the former is way faster than the latter.
123 Doxyfile: $(srcdir)/Doxyfile.in
124 $(edit) $(srcdir)/Doxyfile.in >Doxyfile
126 CLEANDIRS += html latex