1 ## Process this file with automake to produce Makefile.in -*-Makefile-*-
2 ## Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 AM_MAKEINFOFLAGS = --no-split
18 info_TEXINFOS = bison.texinfo
19 bison_TEXINFOS = gpl-3.0.texi fdl.texi
21 CLEANFILES = bison.fns
30 EXTRA_DIST = refcard.tex
32 CLEANFILES += refcard.dvi refcard.log refcard.ps
34 refcard.dvi: refcard.tex
37 refcard.ps: refcard.dvi
44 dist_man_MANS = $(srcdir)/bison.1
46 EXTRA_DIST += $(dist_man_MANS:.1=.x) common.x
47 MAINTAINERCLEANFILES = $(dist_man_MANS)
49 # Depend on configure.ac to get version number changes.
50 common_dep = $(top_srcdir)/configure.ac $(srcdir)/common.x
51 srcsrcdir = $(top_srcdir)/bin
52 $(srcdir)/bison.1: $(common_dep) $(top_srcdir)/src/getargs.c
54 remove_time_stamp = 's/^\(\.TH[^"]*"[^"]*"[^"]*\)"[^"]*"/\1/'
56 MOSTLYCLEANFILES = $(srcdir)/*.t
60 PREPATH = $(top_builddir)/src
62 @program=`expr "/$*" : '.*/\(.*\)'` && \
64 IFS=$(PATH_SEPARATOR); \
65 for dir in $(PREPATH); do \
67 echo cd $$dir '&&' $(MAKE) $(AM_MAKEFLAGS) $$program && \
68 (cd $$dir && $(MAKE) $(AM_MAKEFLAGS) $$program) || exit; \
70 @echo "Updating man page $@"
71 PATH="$(PREPATH)$(PATH_SEPARATOR)$$PATH"; \
75 --include=$(srcdir)/common.x \
76 --output=$@.t `echo '$*' | sed 's,.*/,,'`
77 if sed $(remove_time_stamp) $@ >$@a.t 2>/dev/null && \
78 sed $(remove_time_stamp) $@.t | cmp $@a.t - >/dev/null 2>&1; then \
99 edit = sed -e "s|@ID@|$$Id|" \
100 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
101 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
102 -e 's,@top_builddir\@,$(top_builddir),g' \
103 -e 's,@top_srcdir\@,$(top_srcdir),g'
105 EXTRA_DIST += Doxyfile.in
106 CLEANFILES += Doxyfile
107 # Sed is used to generate Doxyfile from Doxyfile.in instead of
108 # configure, because the former is way faster than the latter.
109 # Moreover, this file is updated whenever ChangeLog is touched: using
110 # sed instead of configure saves us a lot of time.
111 Doxyfile: $(top_srcdir)/ChangeLog $(srcdir)/Doxyfile.in
112 Id=`grep '^\$$Id' $(top_srcdir)/ChangeLog`; \
113 $(edit) $(srcdir)/Doxyfile.in >Doxyfile
115 CLEANDIRS += html latex