Release Version 2.62.
[autoconf.git] / man / Makefile.am
blob119c91d788780cb28f8e3b52120c234ff995dfe0
1 # Make Autoconf man pages.
3 # Copyright (C) 2001, 2004-2008 Free Software Foundation, Inc.
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.
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.
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/>.
18 dist_man_MANS = \
19         $(srcdir)/autoconf.1 \
20         $(srcdir)/autoheader.1 \
21         $(srcdir)/autom4te.1 \
22         $(srcdir)/autoreconf.1 \
23         $(srcdir)/autoscan.1 \
24         $(srcdir)/autoupdate.1 \
25         $(srcdir)/ifnames.1 \
26         $(srcdir)/config.guess.1 \
27         $(srcdir)/config.sub.1
29 EXTRA_DIST = $(dist_man_MANS:.1=.x) common.x
30 MAINTAINERCLEANFILES = $(dist_man_MANS)
32 # Depend on .version to get version number changes.
33 common_dep = $(top_srcdir)/.version $(srcdir)/common.x
34 binsrcdir = $(top_srcdir)/bin
35 $(srcdir)/autoconf.1:   $(common_dep) $(binsrcdir)/autoconf.as
36 $(srcdir)/autoheader.1: $(common_dep) $(binsrcdir)/autoheader.in
37 $(srcdir)/autom4te.1:   $(common_dep) $(binsrcdir)/autom4te.in
38 $(srcdir)/autoreconf.1: $(common_dep) $(binsrcdir)/autoreconf.in
39 $(srcdir)/autoscan.1:   $(common_dep) $(binsrcdir)/autoscan.in
40 $(srcdir)/autoupdate.1: $(common_dep) $(binsrcdir)/autoupdate.in
41 $(srcdir)/ifnames.1:    $(common_dep) $(binsrcdir)/ifnames.in
43 # Independent from this package.
44 $(srcdir)/config.guess.1: $(top_srcdir)/build-aux/config.guess
45 $(srcdir)/config.sub.1:   $(top_srcdir)/build-aux/config.sub
47 remove_time_stamp = 's/^\(\.TH[^"]*"[^"]*"[^"]*\)"[^"]*"/\1/'
49 MOSTLYCLEANFILES = $(srcdir)/*.t
51 SUFFIXES = .x .1
53 .x.1:
54         @echo "Updating man page $@"
55         PATH="$(top_builddir)/tests$(PATH_SEPARATOR)$(top_srcdir)/build-aux$(PATH_SEPARATOR)$$PATH"; \
56         export PATH; \
57         $(HELP2MAN) \
58             --include=$*.x \
59             --include=$(srcdir)/common.x \
60             --source='$(PACKAGE_STRING)' \
61             --output=$@.t `echo '$*' | sed 's,.*/,,'`
62         if sed $(remove_time_stamp) $@ >$@a.t 2>/dev/null && \
63            sed $(remove_time_stamp) $@.t | cmp $@a.t - >/dev/null 2>&1; then \
64                 touch $@; \
65         else \
66                 mv $@.t $@; \
67         fi
68         rm -f $@*.t