]> git.saurik.com Git - bison.git/blob - doc/Makefile.am
doc: fix lalr1.cc documentation.
[bison.git] / doc / Makefile.am
1 ## Process this file with automake to produce Makefile.in -*-Makefile-*-
2 ## Copyright (C) 2001-2003, 2005-2010 Free Software Foundation, Inc.
3
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.
8 #
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.
13 #
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/>.
16
17 AM_MAKEINFOFLAGS = --no-split
18 info_TEXINFOS = bison.texinfo
19 bison_TEXINFOS = $(srcdir)/cross-options.texi gpl-3.0.texi fdl.texi
20
21 CLEANFILES = bison.fns
22 CLEANDIRS = *.t2d
23 clean-local:
24 rm -rf $(CLEANDIRS)
25
26 CROSS_OPTIONS_PL = $(top_srcdir)/build-aux/cross-options.pl
27 $(srcdir)/cross-options.texi: $(top_srcdir)/src/getargs.c $(CROSS_OPTIONS_PL)
28 mv -f $@ $@~ || : >$@~
29 -rm -f $@.tmp
30 cd $(top_builddir)/src && $(MAKE) $(AM_MAKEFLAGS) bison
31 $(top_builddir)/src/bison --help \
32 | perl $(CROSS_OPTIONS_PL) $(top_srcdir)/src/scan-gram.l >$@.tmp
33 diff -u $@~ $@.tmp || true
34 mv $@.tmp $@
35 MAINTAINERCLEANFILES = $(srcdir)/cross-options.texi
36
37 ## ---------- ##
38 ## Ref card. ##
39 ## ---------- ##
40
41 EXTRA_DIST = refcard.tex
42 CLEANFILES += refcard.dvi refcard.log refcard.ps
43
44 refcard.dvi: refcard.tex
45 tex refcard.tex
46
47 refcard.ps: refcard.dvi
48
49
50 ## ----------- ##
51 ## Man Pages. ##
52 ## ----------- ##
53
54 dist_man_MANS = $(srcdir)/bison.1
55
56 EXTRA_DIST += $(dist_man_MANS:.1=.x) common.x
57 MAINTAINERCLEANFILES += $(dist_man_MANS)
58
59 # Depend on configure to get version number changes.
60 common_dep = $(top_srcdir)/configure $(srcdir)/common.x
61 srcsrcdir = $(top_srcdir)/bin
62 $(srcdir)/bison.1: $(common_dep) $(top_srcdir)/src/getargs.c
63
64 # Differences to ignore when comparing the man page (the date).
65 remove_time_stamp = \
66 sed 's/^\(\.TH[^"]*"[^"]*"[^"]*\)"[^"]*"/\1/'
67
68 MOSTLYCLEANFILES = $(srcdir)/*.t
69
70 SUFFIXES = .x .1
71
72 PREPATH = $(top_builddir)/src
73 .x.1:
74 @program=`expr "/$*" : '.*/\(.*\)'` && \
75 save_IFS=$IFS; \
76 IFS=$(PATH_SEPARATOR); \
77 for dir in $(PREPATH); do \
78 IFS=$save_IFS; \
79 echo cd $$dir '&&' $(MAKE) $(AM_MAKEFLAGS) $$program && \
80 (cd $$dir && $(MAKE) $(AM_MAKEFLAGS) $$program) || exit; \
81 done
82 @echo "Updating man page $@"
83 PATH="$(PREPATH)$(PATH_SEPARATOR)$$PATH"; \
84 export PATH; \
85 $(HELP2MAN) \
86 --include=$*.x \
87 --include=$(srcdir)/common.x \
88 --output=$@.t `echo '$*' | sed 's,.*/,,'`
89 if $(remove_time_stamp) $@ >$@a.t 2>/dev/null && \
90 $(remove_time_stamp) $@.t | cmp $@a.t - >/dev/null 2>&1; then \
91 touch $@; \
92 else \
93 mv $@.t $@; \
94 fi
95 rm -f $@*.t
96
97 nodist_man_MANS = yacc.1
98
99 ## -------------- ##
100 ## Doxygenation. ##
101 ## -------------- ##
102
103 DOXYGEN = doxygen
104
105 .PHONY: doc html
106
107 doc: html
108
109 html-local: Doxyfile
110 $(DOXYGEN)
111
112 edit = sed -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
113 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
114 -e 's,@top_builddir\@,$(top_builddir),g' \
115 -e 's,@top_srcdir\@,$(top_srcdir),g'
116
117 EXTRA_DIST += Doxyfile.in
118 CLEANFILES += Doxyfile
119 # Sed is used to generate Doxyfile from Doxyfile.in instead of
120 # configure, because the former is way faster than the latter.
121 Doxyfile: $(srcdir)/Doxyfile.in
122 $(edit) $(srcdir)/Doxyfile.in >Doxyfile
123
124 CLEANDIRS += html latex