1 ## Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009
2 ## 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 = 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 # Create $@~ which is the previous contents. Don't use `mv' here so
33 # that even if we are interrupted, the file is still available for
34 # diff in the next run. Note that $@ might not exist yet.
35 { test ! -f $@ || cat $@; } >$@~
36 test ! -f $@.tmp || rm -f $@.tmp
37 $(MAKE) $(AM_MAKEFLAGS) src/bison$(EXEEXT)
39 perl $(CROSS_OPTIONS_PL) $(top_srcdir)/src/scan-gram.l >$@.tmp
40 diff -u $@~ $@.tmp || true
42 MAINTAINERCLEANFILES = $(CROSS_OPTIONS_TEXI)
48 EXTRA_DIST += doc/refcard.tex
49 CLEANFILES += doc/refcard.dvi doc/refcard.log doc/refcard.ps
51 doc/refcard.dvi: doc/refcard.tex
52 cd doc && tex refcard.tex
54 doc/refcard.ps: doc/refcard.dvi
61 dist_man_MANS = $(top_srcdir)/doc/bison.1
63 EXTRA_DIST += $(dist_man_MANS:.1=.x) doc/common.x
64 MAINTAINERCLEANFILES += $(dist_man_MANS)
66 # Depend on configure to get version number changes.
67 common_dep = $(top_srcdir)/configure $(top_srcdir)/doc/common.x
68 $(top_srcdir)/doc/bison.1: $(common_dep) $(top_srcdir)/src/getargs.c
70 # Differences to ignore when comparing the man page (the date).
72 sed 's/^\(\.TH[^"]*"[^"]*"[^"]*\)"[^"]*"/\1/'
74 MOSTLYCLEANFILES += $(top_srcdir)/doc/*.t
80 @program=`expr "/$*" : '.*/\(.*\)'` && \
82 IFS=$(PATH_SEPARATOR); \
83 for dir in $(PREPATH); do \
85 echo $(MAKE) $(AM_MAKEFLAGS) $$dir/$$program; \
86 $(MAKE) $(AM_MAKEFLAGS) $$dir/$$program || exit; \
88 @echo "Updating man page $@"
89 PATH="$(top_builddir)/$(PREPATH)$(PATH_SEPARATOR)$$PATH"; \
93 --include=$(top_srcdir)/doc/common.x \
94 --output=$@.t `echo '$*' | sed 's,.*/,,'`
95 if $(remove_time_stamp) $@ >$@a.t 2>/dev/null && \
96 $(remove_time_stamp) $@.t | cmp $@a.t - >/dev/null 2>&1; then \
103 nodist_man_MANS = doc/yacc.1
115 html-local: doc/Doxyfile
118 edit = sed -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
119 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
120 -e 's,@top_builddir\@,$(top_builddir),g' \
121 -e 's,@top_srcdir\@,$(top_srcdir),g'
123 EXTRA_DIST += doc/Doxyfile.in
124 CLEANFILES += doc/Doxyfile
125 # Sed is used to generate Doxyfile from Doxyfile.in instead of
126 # configure, because the former is way faster than the latter.
127 doc/Doxyfile: $(top_srcdir)/doc/Doxyfile.in
128 $(edit) $(top_srcdir)/doc/Doxyfile.in >doc/Doxyfile
130 CLEANDIRS += html latex