1 ## Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, 2008 Free Software
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 = doc/bison.texinfo
19 doc_bison_TEXINFOS = \
20 $(CROSS_OPTIONS_TEXI) \
24 CLEANFILES = doc/bison.fns
29 CROSS_OPTIONS_PL = $(top_srcdir)/build-aux/cross-options.pl
30 CROSS_OPTIONS_TEXI = $(top_srcdir)/doc/cross-options.texi
31 $(CROSS_OPTIONS_TEXI): $(top_srcdir)/src/getargs.c $(CROSS_OPTIONS_PL)
33 $(MAKE) $(AM_MAKEFLAGS) src/bison$(EXEEXT)
34 $(top_builddir)/src/bison --help | perl $(CROSS_OPTIONS_PL) >$@.tmp
36 MAINTAINERCLEANFILES = $(CROSS_OPTIONS_TEXI)
42 EXTRA_DIST += doc/refcard.tex
43 CLEANFILES += doc/refcard.dvi doc/refcard.log doc/refcard.ps
45 doc/refcard.dvi: doc/refcard.tex
46 cd doc && tex refcard.tex
48 doc/refcard.ps: doc/refcard.dvi
55 dist_man_MANS = $(top_srcdir)/doc/bison.1
57 EXTRA_DIST += $(dist_man_MANS:.1=.x) doc/common.x
58 MAINTAINERCLEANFILES += $(dist_man_MANS)
60 # Depend on configure to get version number changes.
61 common_dep = $(top_srcdir)/configure $(top_srcdir)/doc/common.x
62 $(top_srcdir)/doc/bison.1: $(common_dep) $(top_srcdir)/src/getargs.c
64 # Differences to ignore when comparing the man page (the date).
66 sed 's/^\(\.TH[^"]*"[^"]*"[^"]*\)"[^"]*"/\1/'
68 MOSTLYCLEANFILES += $(top_srcdir)/doc/*.t
74 @program=`expr "/$*" : '.*/\(.*\)'` && \
76 IFS=$(PATH_SEPARATOR); \
77 for dir in $(PREPATH); do \
79 echo $(MAKE) $(AM_MAKEFLAGS) $$dir/$$program; \
80 $(MAKE) $(AM_MAKEFLAGS) $$dir/$$program || exit; \
82 @echo "Updating man page $@"
83 PATH="$(top_builddir)/$(PREPATH)$(PATH_SEPARATOR)$$PATH"; \
87 --include=$(top_srcdir)/doc/common.x \
88 --output=$@.t `echo '$*' | sed 's,.*/,,'`
89 if $(remove_time_stamp) $@ >$@a.t 2>/dev/null && \
90 $(remove_time_stamp) $@.t | cmp $@a.t - >/dev/null 2>&1; then \
97 nodist_man_MANS = doc/yacc.1
109 html-local: doc/Doxyfile
112 edit = sed -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
113 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
114 -e 's,@top_builddir\@,$(top_builddir),g' \
115 -e 's,@top_srcdir\@,$(top_srcdir),g'
117 EXTRA_DIST += doc/Doxyfile.in
118 CLEANFILES += doc/Doxyfile
119 # Sed is used to generate Doxyfile from Doxyfile.in instead of
120 # configure, because the former is way faster than the latter.
121 doc/Doxyfile: $(top_srcdir)/doc/Doxyfile.in
122 $(edit) $(top_srcdir)/doc/Doxyfile.in >doc/Doxyfile
124 CLEANDIRS += html latex