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)
32 mv -f $@ $@~ || : >$@~
34 $(MAKE) $(AM_MAKEFLAGS) src/bison$(EXEEXT)
35 $(top_builddir)/src/bison --help | \
36 perl $(CROSS_OPTIONS_PL) $(top_srcdir)/src/scan-gram.l >$@.tmp
37 diff -u $@~ $@.tmp || true
39 MAINTAINERCLEANFILES = $(CROSS_OPTIONS_TEXI)
45 EXTRA_DIST += doc/refcard.tex
46 CLEANFILES += doc/refcard.dvi doc/refcard.log doc/refcard.ps
48 doc/refcard.dvi: doc/refcard.tex
49 cd doc && tex refcard.tex
51 doc/refcard.ps: doc/refcard.dvi
58 dist_man_MANS = $(top_srcdir)/doc/bison.1
60 EXTRA_DIST += $(dist_man_MANS:.1=.x) doc/common.x
61 MAINTAINERCLEANFILES += $(dist_man_MANS)
63 # Depend on configure to get version number changes.
64 common_dep = $(top_srcdir)/configure $(top_srcdir)/doc/common.x
65 $(top_srcdir)/doc/bison.1: $(common_dep) $(top_srcdir)/src/getargs.c
67 # Differences to ignore when comparing the man page (the date).
69 sed 's/^\(\.TH[^"]*"[^"]*"[^"]*\)"[^"]*"/\1/'
71 MOSTLYCLEANFILES += $(top_srcdir)/doc/*.t
77 @program=`expr "/$*" : '.*/\(.*\)'` && \
79 IFS=$(PATH_SEPARATOR); \
80 for dir in $(PREPATH); do \
82 echo $(MAKE) $(AM_MAKEFLAGS) $$dir/$$program; \
83 $(MAKE) $(AM_MAKEFLAGS) $$dir/$$program || exit; \
85 @echo "Updating man page $@"
86 PATH="$(top_builddir)/$(PREPATH)$(PATH_SEPARATOR)$$PATH"; \
90 --include=$(top_srcdir)/doc/common.x \
91 --output=$@.t `echo '$*' | sed 's,.*/,,'`
92 if $(remove_time_stamp) $@ >$@a.t 2>/dev/null && \
93 $(remove_time_stamp) $@.t | cmp $@a.t - >/dev/null 2>&1; then \
100 nodist_man_MANS = doc/yacc.1
112 html-local: doc/Doxyfile
115 edit = sed -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
116 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
117 -e 's,@top_builddir\@,$(top_builddir),g' \
118 -e 's,@top_srcdir\@,$(top_srcdir),g'
120 EXTRA_DIST += doc/Doxyfile.in
121 CLEANFILES += doc/Doxyfile
122 # Sed is used to generate Doxyfile from Doxyfile.in instead of
123 # configure, because the former is way faster than the latter.
124 doc/Doxyfile: $(top_srcdir)/doc/Doxyfile.in
125 $(edit) $(top_srcdir)/doc/Doxyfile.in >doc/Doxyfile
127 CLEANDIRS += html latex