]> git.saurik.com Git - bison.git/blame - doc/Makefile.am
news: prepare for forthcoming release
[bison.git] / doc / Makefile.am
CommitLineData
8ebbae2a 1## Process this file with automake to produce Makefile.in -*-Makefile-*-
6e30ede8 2
c932d613 3## Copyright (C) 2001-2003, 2005-2012 Free Software 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
9bcffa0c 19info_TEXINFOS = bison.texi
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)
08023564
AD
29 $(AM_V_GEN)mv -f $@ $@~ || : >$@~
30 $(AM_V_at)rm -f $@.tmp
31 $(AM_V_at)cd $(top_builddir)/src && $(MAKE) $(AM_MAKEFLAGS) bison
32 $(AM_V_at)$(top_builddir)/src/bison --help \
45fdfd81 33 | $(PERL) $(CROSS_OPTIONS_PL) $(top_srcdir)/src/scan-gram.l >$@.tmp
08023564
AD
34 $(AM_V_at)diff -u $@~ $@.tmp || true
35 $(AM_V_at)mv $@.tmp $@
2f7a96b5 36MAINTAINERCLEANFILES = $(srcdir)/cross-options.texi
828c373b 37
727a1401
AD
38## ---------- ##
39## Ref card. ##
40## ---------- ##
41
42EXTRA_DIST = refcard.tex
727a1401
AD
43CLEANFILES += refcard.dvi refcard.log refcard.ps
44
649d71cc 45refcard.dvi: refcard.tex
08023564 46 $(AM_V_GEN)tex refcard.tex
649d71cc
JT
47
48refcard.ps: refcard.dvi
2073e1b6
AD
49
50
727a1401
AD
51## ----------- ##
52## Man Pages. ##
53## ----------- ##
54
55dist_man_MANS = $(srcdir)/bison.1
56
57EXTRA_DIST += $(dist_man_MANS:.1=.x) common.x
2f7a96b5 58MAINTAINERCLEANFILES += $(dist_man_MANS)
727a1401 59
c53d18b1
JD
60# Depend on configure to get version number changes.
61common_dep = $(top_srcdir)/configure $(srcdir)/common.x
727a1401
AD
62srcsrcdir = $(top_srcdir)/bin
63$(srcdir)/bison.1: $(common_dep) $(top_srcdir)/src/getargs.c
64
e8b1fb9b
AD
65# Differences to ignore when comparing the man page (the date).
66remove_time_stamp = \
67 sed 's/^\(\.TH[^"]*"[^"]*"[^"]*\)"[^"]*"/\1/'
68
727a1401
AD
69MOSTLYCLEANFILES = $(srcdir)/*.t
70
71SUFFIXES = .x .1
72
73PREPATH = $(top_builddir)/src
74.x.1:
08023564 75 $(AM_V_GEN)program=`expr "/$*" : '.*/\(.*\)'` && \
727a1401
AD
76 save_IFS=$IFS; \
77 IFS=$(PATH_SEPARATOR); \
78 for dir in $(PREPATH); do \
79 IFS=$save_IFS; \
80 echo cd $$dir '&&' $(MAKE) $(AM_MAKEFLAGS) $$program && \
81 (cd $$dir && $(MAKE) $(AM_MAKEFLAGS) $$program) || exit; \
82 done
08023564 83 $(AM_V_at)PATH="$(PREPATH)$(PATH_SEPARATOR)$$PATH"; \
727a1401
AD
84 export PATH; \
85 $(HELP2MAN) \
86 --include=$*.x \
87 --include=$(srcdir)/common.x \
88 --output=$@.t `echo '$*' | sed 's,.*/,,'`
08023564 89 $(AM_V_at)if $(remove_time_stamp) $@ >$@a.t 2>/dev/null && \
e8b1fb9b 90 $(remove_time_stamp) $@.t | cmp $@a.t - >/dev/null 2>&1; then \
727a1401
AD
91 touch $@; \
92 else \
93 mv $@.t $@; \
94 fi
08023564 95 $(AM_V_at)rm -f $@*.t
727a1401 96
a005a9c4 97nodist_man_MANS = yacc.1
2073e1b6 98
c949ada3
AD
99## ------------------------------ ##
100## Graphviz examples generation. ##
101## ------------------------------ ##
fc4fdd62
TR
102
103CLEANDIRS += figs
c949ada3 104FIGS_DOT = figs/example.dot figs/example-reduce.dot figs/example-shift.dot
a029e56f 105EXTRA_DIST += \
c949ada3 106 figs/example.y \
a029e56f
AD
107 $(FIGS_DOT) \
108 $(FIGS_DOT:.dot=.eps) $(FIGS_DOT:.dot=.pdf) $(FIGS_DOT:.dot=.png)
fc4fdd62
TR
109SUFFIXES += .dot .eps .pdf .png
110
a029e56f
AD
111bison.dvi: $(FIGS_DOT:.dot=.eps)
112bison.html: $(FIGS_DOT:.dot=.png)
113bison.pdf: $(FIGS_DOT:.dot=.pdf)
fc4fdd62
TR
114
115.dot.eps:
116 $(AM_V_GEN) $(MKDIR_P) `echo "./$@" | sed -e 's,/[^/]*$$,,'`
a029e56f 117 $(AM_V_at) $(DOT) -Gmargin=0 -Teps $< >$@.tmp
fc4fdd62
TR
118 $(AM_V_at) mv $@.tmp $@
119
120.dot.pdf:
121 $(AM_V_GEN) $(MKDIR_P) `echo "./$@" | sed -e 's,/[^/]*$$,,'`
a029e56f 122 $(AM_V_at) $(DOT) -Gmargin=0 -Tpdf $< >$@.tmp
fc4fdd62
TR
123 $(AM_V_at) mv $@.tmp $@
124
125.dot.png:
126 $(AM_V_GEN) $(MKDIR_P) `echo "./$@" | sed -e 's,/[^/]*$$,,'`
a029e56f 127 $(AM_V_at) $(DOT) -Gmargin=0 -Tpng $< >$@.tmp
fc4fdd62
TR
128 $(AM_V_at) mv $@.tmp $@
129
2073e1b6
AD
130## -------------- ##
131## Doxygenation. ##
132## -------------- ##
133
134DOXYGEN = doxygen
135
136.PHONY: doc html
137
138doc: html
139
140html-local: Doxyfile
141 $(DOXYGEN)
142
78029cd5 143edit = sed -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
2073e1b6
AD
144 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
145 -e 's,@top_builddir\@,$(top_builddir),g' \
146 -e 's,@top_srcdir\@,$(top_srcdir),g'
147
148EXTRA_DIST += Doxyfile.in
149CLEANFILES += Doxyfile
150# Sed is used to generate Doxyfile from Doxyfile.in instead of
151# configure, because the former is way faster than the latter.
78029cd5 152Doxyfile: $(srcdir)/Doxyfile.in
08023564 153 $(AM_V_GEN)$(edit) $(srcdir)/Doxyfile.in >Doxyfile
2073e1b6
AD
154
155CLEANDIRS += html latex