]> git.saurik.com Git - bison.git/blame - doc/Makefile.am
Regen.
[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
59$(srcdir)/bison.1: $(common_dep) $(top_srcdir)/src/getargs.c
60
e8b1fb9b
AD
61# Differences to ignore when comparing the man page (the date).
62remove_time_stamp = \
63 sed 's/^\(\.TH[^"]*"[^"]*"[^"]*\)"[^"]*"/\1/'
64
727a1401
AD
65MOSTLYCLEANFILES = $(srcdir)/*.t
66
67SUFFIXES = .x .1
68
0305d25e 69PREPATH = src
727a1401 70.x.1:
0305d25e
AD
71 @program=`expr "/$*" : '.*/\(.*\)'` && \
72 save_IFS=$IFS; \
73 IFS=$(PATH_SEPARATOR); \
74 for dir in $(PREPATH); do \
75 IFS=$save_IFS; \
76 echo cd $(top_builddir) '&&' \
77 $(MAKE) $(AM_MAKEFLAGS) $$dir/$$program && \
78 (cd $(top_builddir) && \
79 $(MAKE) $(AM_MAKEFLAGS) $$dir/$$program) || exit; \
727a1401
AD
80 done
81 @echo "Updating man page $@"
0305d25e
AD
82 PATH="$(top_builddir)/$(PREPATH)$(PATH_SEPARATOR)$$PATH"; \
83 export PATH; \
84 $(HELP2MAN) \
85 --include=$*.x \
86 --include=$(srcdir)/common.x \
727a1401 87 --output=$@.t `echo '$*' | sed 's,.*/,,'`
0305d25e
AD
88 if $(remove_time_stamp) $@ >$@a.t 2>/dev/null && \
89 $(remove_time_stamp) $@.t | cmp $@a.t - >/dev/null 2>&1; then \
90 touch $@; \
91 else \
92 mv $@.t $@; \
727a1401
AD
93 fi
94 rm -f $@*.t
95
a005a9c4 96nodist_man_MANS = yacc.1
2073e1b6
AD
97
98## -------------- ##
99## Doxygenation. ##
100## -------------- ##
101
102DOXYGEN = doxygen
103
104.PHONY: doc html
105
106doc: html
107
108html-local: Doxyfile
109 $(DOXYGEN)
110
78029cd5 111edit = sed -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
2073e1b6
AD
112 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
113 -e 's,@top_builddir\@,$(top_builddir),g' \
114 -e 's,@top_srcdir\@,$(top_srcdir),g'
115
116EXTRA_DIST += Doxyfile.in
117CLEANFILES += Doxyfile
118# Sed is used to generate Doxyfile from Doxyfile.in instead of
119# configure, because the former is way faster than the latter.
78029cd5 120Doxyfile: $(srcdir)/Doxyfile.in
2073e1b6
AD
121 $(edit) $(srcdir)/Doxyfile.in >Doxyfile
122
123CLEANDIRS += html latex