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