]> git.saurik.com Git - bison.git/blob - doc/Makefile.am
gnulib: update
[bison.git] / doc / Makefile.am
1 ## Process this file with automake to produce Makefile.in -*-Makefile-*-
2
3 ## Copyright (C) 2001-2003, 2005-2012 Free Software Foundation, Inc.
4
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/>.
17
18 AM_MAKEINFOFLAGS = --no-split
19 info_TEXINFOS = bison.texi
20 bison_TEXINFOS = $(srcdir)/cross-options.texi gpl-3.0.texi fdl.texi
21
22 CLEANFILES = bison.fns
23 CLEANDIRS = *.t2d
24 clean-local:
25 rm -rf $(CLEANDIRS)
26
27 CROSS_OPTIONS_PL = $(top_srcdir)/build-aux/cross-options.pl
28 $(srcdir)/cross-options.texi: $(top_srcdir)/src/getargs.c $(CROSS_OPTIONS_PL)
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 \
33 | $(PERL) $(CROSS_OPTIONS_PL) $(top_srcdir)/src/scan-gram.l >$@.tmp
34 $(AM_V_at)diff -u $@~ $@.tmp || true
35 $(AM_V_at)mv $@.tmp $@
36 MAINTAINERCLEANFILES = $(srcdir)/cross-options.texi
37
38 ## ---------- ##
39 ## Ref card. ##
40 ## ---------- ##
41
42 EXTRA_DIST = refcard.tex
43 CLEANFILES += refcard.dvi refcard.log refcard.ps
44
45 refcard.dvi: refcard.tex
46 $(AM_V_GEN)tex refcard.tex
47
48 refcard.ps: refcard.dvi
49
50
51 ## ----------- ##
52 ## Man Pages. ##
53 ## ----------- ##
54
55 dist_man_MANS = $(srcdir)/bison.1
56
57 EXTRA_DIST += $(dist_man_MANS:.1=.x) common.x
58 MAINTAINERCLEANFILES += $(dist_man_MANS)
59
60 # Depend on configure to get version number changes.
61 common_dep = $(top_srcdir)/configure $(srcdir)/common.x
62 srcsrcdir = $(top_srcdir)/bin
63 $(srcdir)/bison.1: $(common_dep) $(top_srcdir)/src/getargs.c
64
65 # Differences to ignore when comparing the man page (the date).
66 remove_time_stamp = \
67 sed 's/^\(\.TH[^"]*"[^"]*"[^"]*\)"[^"]*"/\1/'
68
69 MOSTLYCLEANFILES = $(srcdir)/*.t
70
71 SUFFIXES = .x .1
72
73 PREPATH = $(top_builddir)/src
74 .x.1:
75 $(AM_V_GEN)program=`expr "/$*" : '.*/\(.*\)'` && \
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
83 $(AM_V_at)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 $(AM_V_at)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 $(AM_V_at)rm -f $@*.t
96
97 nodist_man_MANS = yacc.1
98
99 ## ----------------------------- ##
100 ## Graphviz examples generation. ##
101 ## ----------------------------- ##
102
103 CLEANDIRS += figs
104 FIGS_DOT = figs/example-reduce.dot figs/example-shift.dot
105 EXTRA_DIST += \
106 $(FIGS_DOT) \
107 $(FIGS_DOT:.dot=.eps) $(FIGS_DOT:.dot=.pdf) $(FIGS_DOT:.dot=.png)
108 SUFFIXES += .dot .eps .pdf .png
109
110 bison.dvi: $(FIGS_DOT:.dot=.eps)
111 bison.html: $(FIGS_DOT:.dot=.png)
112 bison.pdf: $(FIGS_DOT:.dot=.pdf)
113
114 .dot.eps:
115 $(AM_V_GEN) $(MKDIR_P) `echo "./$@" | sed -e 's,/[^/]*$$,,'`
116 $(AM_V_at) $(DOT) -Gmargin=0 -Teps $< >$@.tmp
117 $(AM_V_at) mv $@.tmp $@
118
119 .dot.pdf:
120 $(AM_V_GEN) $(MKDIR_P) `echo "./$@" | sed -e 's,/[^/]*$$,,'`
121 $(AM_V_at) $(DOT) -Gmargin=0 -Tpdf $< >$@.tmp
122 $(AM_V_at) mv $@.tmp $@
123
124 .dot.png:
125 $(AM_V_GEN) $(MKDIR_P) `echo "./$@" | sed -e 's,/[^/]*$$,,'`
126 $(AM_V_at) $(DOT) -Gmargin=0 -Tpng $< >$@.tmp
127 $(AM_V_at) mv $@.tmp $@
128
129 ## -------------- ##
130 ## Doxygenation. ##
131 ## -------------- ##
132
133 DOXYGEN = doxygen
134
135 .PHONY: doc html
136
137 doc: html
138
139 html-local: Doxyfile
140 $(DOXYGEN)
141
142 edit = sed -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
143 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
144 -e 's,@top_builddir\@,$(top_builddir),g' \
145 -e 's,@top_srcdir\@,$(top_srcdir),g'
146
147 EXTRA_DIST += Doxyfile.in
148 CLEANFILES += Doxyfile
149 # Sed is used to generate Doxyfile from Doxyfile.in instead of
150 # configure, because the former is way faster than the latter.
151 Doxyfile: $(srcdir)/Doxyfile.in
152 $(AM_V_GEN)$(edit) $(srcdir)/Doxyfile.in >Doxyfile
153
154 CLEANDIRS += html latex