]>
Commit | Line | Data |
---|---|---|
8ebbae2a | 1 | ## Process this file with automake to produce Makefile.in -*-Makefile-*- |
219c26ea | 2 | ## Copyright (C) 2001-2003, 2005-2010 Free Software Foundation, Inc. |
0435d061 | 3 | |
f16b0819 PE |
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/>. | |
8ebbae2a | 16 | |
b8be9132 | 17 | AM_MAKEINFOFLAGS = --no-split |
8ebbae2a | 18 | info_TEXINFOS = bison.texinfo |
2f7a96b5 AD |
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) | |
be252c39 AD |
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 | -rm -f $@ $@.tmp | |
29 | cd $(top_builddir)/src && $(MAKE) $(AM_MAKEFLAGS) bison | |
30 | $(top_builddir)/src/bison --help | perl $(CROSS_OPTIONS_PL) >$@.tmp | |
31 | mv $@.tmp $@ | |
2f7a96b5 | 32 | MAINTAINERCLEANFILES = $(srcdir)/cross-options.texi |
828c373b | 33 | |
727a1401 AD |
34 | ## ---------- ## |
35 | ## Ref card. ## | |
36 | ## ---------- ## | |
37 | ||
38 | EXTRA_DIST = refcard.tex | |
727a1401 AD |
39 | CLEANFILES += refcard.dvi refcard.log refcard.ps |
40 | ||
649d71cc JT |
41 | refcard.dvi: refcard.tex |
42 | tex refcard.tex | |
43 | ||
44 | refcard.ps: refcard.dvi | |
2073e1b6 AD |
45 | |
46 | ||
727a1401 AD |
47 | ## ----------- ## |
48 | ## Man Pages. ## | |
49 | ## ----------- ## | |
50 | ||
51 | dist_man_MANS = $(srcdir)/bison.1 | |
52 | ||
53 | EXTRA_DIST += $(dist_man_MANS:.1=.x) common.x | |
2f7a96b5 | 54 | MAINTAINERCLEANFILES += $(dist_man_MANS) |
727a1401 | 55 | |
c53d18b1 JD |
56 | # Depend on configure to get version number changes. |
57 | common_dep = $(top_srcdir)/configure $(srcdir)/common.x | |
727a1401 AD |
58 | srcsrcdir = $(top_srcdir)/bin |
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). |
62 | remove_time_stamp = \ | |
63 | sed 's/^\(\.TH[^"]*"[^"]*"[^"]*\)"[^"]*"/\1/' | |
64 | ||
727a1401 AD |
65 | MOSTLYCLEANFILES = $(srcdir)/*.t |
66 | ||
67 | SUFFIXES = .x .1 | |
68 | ||
69 | PREPATH = $(top_builddir)/src | |
70 | .x.1: | |
71 | @program=`expr "/$*" : '.*/\(.*\)'` && \ | |
72 | save_IFS=$IFS; \ | |
73 | IFS=$(PATH_SEPARATOR); \ | |
74 | for dir in $(PREPATH); do \ | |
75 | IFS=$save_IFS; \ | |
76 | echo cd $$dir '&&' $(MAKE) $(AM_MAKEFLAGS) $$program && \ | |
77 | (cd $$dir && $(MAKE) $(AM_MAKEFLAGS) $$program) || exit; \ | |
78 | done | |
79 | @echo "Updating man page $@" | |
80 | PATH="$(PREPATH)$(PATH_SEPARATOR)$$PATH"; \ | |
81 | export PATH; \ | |
82 | $(HELP2MAN) \ | |
83 | --include=$*.x \ | |
84 | --include=$(srcdir)/common.x \ | |
85 | --output=$@.t `echo '$*' | sed 's,.*/,,'` | |
e8b1fb9b AD |
86 | if $(remove_time_stamp) $@ >$@a.t 2>/dev/null && \ |
87 | $(remove_time_stamp) $@.t | cmp $@a.t - >/dev/null 2>&1; then \ | |
727a1401 AD |
88 | touch $@; \ |
89 | else \ | |
90 | mv $@.t $@; \ | |
91 | fi | |
92 | rm -f $@*.t | |
93 | ||
a005a9c4 | 94 | nodist_man_MANS = yacc.1 |
2073e1b6 AD |
95 | |
96 | ## -------------- ## | |
97 | ## Doxygenation. ## | |
98 | ## -------------- ## | |
99 | ||
100 | DOXYGEN = doxygen | |
101 | ||
102 | .PHONY: doc html | |
103 | ||
104 | doc: html | |
105 | ||
106 | html-local: Doxyfile | |
107 | $(DOXYGEN) | |
108 | ||
78029cd5 | 109 | edit = sed -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \ |
2073e1b6 AD |
110 | -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \ |
111 | -e 's,@top_builddir\@,$(top_builddir),g' \ | |
112 | -e 's,@top_srcdir\@,$(top_srcdir),g' | |
113 | ||
114 | EXTRA_DIST += Doxyfile.in | |
115 | CLEANFILES += Doxyfile | |
116 | # Sed is used to generate Doxyfile from Doxyfile.in instead of | |
117 | # configure, because the former is way faster than the latter. | |
78029cd5 | 118 | Doxyfile: $(srcdir)/Doxyfile.in |
2073e1b6 AD |
119 | $(edit) $(srcdir)/Doxyfile.in >Doxyfile |
120 | ||
121 | CLEANDIRS += html latex |