]> git.saurik.com Git - bison.git/blame - doc/Makefile.am
Destroy the variants that remain on the stack in case of error.
[bison.git] / doc / Makefile.am
CommitLineData
8ebbae2a 1## Process this file with automake to produce Makefile.in -*-Makefile-*-
78029cd5
JD
2## Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, 2008 Free Software
3## Foundation, Inc.
0435d061 4
f16b0819
PE
5# This program is free software: you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation, either version 3 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program. If not, see <http://www.gnu.org/licenses/>.
8ebbae2a 17
b8be9132 18AM_MAKEINFOFLAGS = --no-split
8ebbae2a 19info_TEXINFOS = bison.texinfo
2f7a96b5
AD
20bison_TEXINFOS = $(srcdir)/cross-options.texi gpl-3.0.texi fdl.texi
21
22CLEANFILES = bison.fns
23CLEANDIRS = *.t2d
24clean-local:
25 rm -rf $(CLEANDIRS)
be252c39
AD
26
27CROSS_OPTIONS_PL = $(top_srcdir)/build-aux/cross-options.pl
28$(srcdir)/cross-options.texi: $(top_srcdir)/src/getargs.c $(CROSS_OPTIONS_PL)
29 -rm -f $@ $@.tmp
30 cd $(top_builddir)/src && $(MAKE) $(AM_MAKEFLAGS) bison
31 $(top_builddir)/src/bison --help | perl $(CROSS_OPTIONS_PL) >$@.tmp
32 mv $@.tmp $@
2f7a96b5 33MAINTAINERCLEANFILES = $(srcdir)/cross-options.texi
828c373b 34
727a1401
AD
35## ---------- ##
36## Ref card. ##
37## ---------- ##
38
39EXTRA_DIST = refcard.tex
727a1401
AD
40CLEANFILES += refcard.dvi refcard.log refcard.ps
41
649d71cc
JT
42refcard.dvi: refcard.tex
43 tex refcard.tex
44
45refcard.ps: refcard.dvi
2073e1b6
AD
46
47
727a1401
AD
48## ----------- ##
49## Man Pages. ##
50## ----------- ##
51
52dist_man_MANS = $(srcdir)/bison.1
53
54EXTRA_DIST += $(dist_man_MANS:.1=.x) common.x
2f7a96b5 55MAINTAINERCLEANFILES += $(dist_man_MANS)
727a1401 56
c53d18b1
JD
57# Depend on configure to get version number changes.
58common_dep = $(top_srcdir)/configure $(srcdir)/common.x
727a1401
AD
59srcsrcdir = $(top_srcdir)/bin
60$(srcdir)/bison.1: $(common_dep) $(top_srcdir)/src/getargs.c
61
e8b1fb9b
AD
62# Differences to ignore when comparing the man page (the date).
63remove_time_stamp = \
64 sed 's/^\(\.TH[^"]*"[^"]*"[^"]*\)"[^"]*"/\1/'
65
727a1401
AD
66MOSTLYCLEANFILES = $(srcdir)/*.t
67
68SUFFIXES = .x .1
69
70PREPATH = $(top_builddir)/src
71.x.1:
72 @program=`expr "/$*" : '.*/\(.*\)'` && \
73 save_IFS=$IFS; \
74 IFS=$(PATH_SEPARATOR); \
75 for dir in $(PREPATH); do \
76 IFS=$save_IFS; \
77 echo cd $$dir '&&' $(MAKE) $(AM_MAKEFLAGS) $$program && \
78 (cd $$dir && $(MAKE) $(AM_MAKEFLAGS) $$program) || exit; \
79 done
80 @echo "Updating man page $@"
81 PATH="$(PREPATH)$(PATH_SEPARATOR)$$PATH"; \
82 export PATH; \
83 $(HELP2MAN) \
84 --include=$*.x \
85 --include=$(srcdir)/common.x \
86 --output=$@.t `echo '$*' | sed 's,.*/,,'`
e8b1fb9b
AD
87 if $(remove_time_stamp) $@ >$@a.t 2>/dev/null && \
88 $(remove_time_stamp) $@.t | cmp $@a.t - >/dev/null 2>&1; then \
727a1401
AD
89 touch $@; \
90 else \
91 mv $@.t $@; \
92 fi
93 rm -f $@*.t
94
a005a9c4 95nodist_man_MANS = yacc.1
2073e1b6
AD
96
97## -------------- ##
98## Doxygenation. ##
99## -------------- ##
100
101DOXYGEN = doxygen
102
103.PHONY: doc html
104
105doc: html
106
107html-local: Doxyfile
108 $(DOXYGEN)
109
78029cd5 110edit = sed -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
2073e1b6
AD
111 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
112 -e 's,@top_builddir\@,$(top_builddir),g' \
113 -e 's,@top_srcdir\@,$(top_srcdir),g'
114
115EXTRA_DIST += Doxyfile.in
116CLEANFILES += Doxyfile
117# Sed is used to generate Doxyfile from Doxyfile.in instead of
118# configure, because the former is way faster than the latter.
78029cd5 119Doxyfile: $(srcdir)/Doxyfile.in
2073e1b6
AD
120 $(edit) $(srcdir)/Doxyfile.in >Doxyfile
121
122CLEANDIRS += html latex