maint: update copyright dates for 2017
[autoconf.git] / man / local.mk
blob0decd8328c37fb01876d7f4424a735237a07ea14
1 # Make Autoconf man pages.
3 # Copyright (C) 2001, 2004-2017 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 binsrcdir = $(srcdir)/bin
19 mansrcdir = $(srcdir)/man
21 dist_man_MANS = \
22 $(mansrcdir)/autoconf.1 \
23 $(mansrcdir)/autoheader.1 \
24 $(mansrcdir)/autom4te.1 \
25 $(mansrcdir)/autoreconf.1 \
26 $(mansrcdir)/autoscan.1 \
27 $(mansrcdir)/autoupdate.1 \
28 $(mansrcdir)/ifnames.1
30 EXTRA_DIST += $(dist_man_MANS:.1=.x) man/common.x
31 MAINTAINERCLEANFILES += $(dist_man_MANS)
33 # Depend on .version to get version number changes.
34 common_dep = $(srcdir)/.version $(srcdir)/man/common.x
35 $(mansrcdir)/autoconf.1: $(common_dep) $(binsrcdir)/autoconf.as
36 $(mansrcdir)/autoheader.1: $(common_dep) $(binsrcdir)/autoheader.in
37 $(mansrcdir)/autom4te.1: $(common_dep) $(binsrcdir)/autom4te.in
38 $(mansrcdir)/autoreconf.1: $(common_dep) $(binsrcdir)/autoreconf.in
39 $(mansrcdir)/autoscan.1: $(common_dep) $(binsrcdir)/autoscan.in
40 $(mansrcdir)/autoupdate.1: $(common_dep) $(binsrcdir)/autoupdate.in
41 $(mansrcdir)/ifnames.1: $(common_dep) $(binsrcdir)/ifnames.in
43 remove_time_stamp = 's/^\(\.TH[^"]*"[^"]*"[^"]*\)"[^"]*"/\1/'
45 MOSTLYCLEANFILES += $(srcdir)/man/*.t
47 SUFFIXES += .x .1
49 .x.1:
50 @echo "Updating man page $@"
51 PATH="./tests$(PATH_SEPARATOR)$(top_srcdir)/build-aux$(PATH_SEPARATOR)$$PATH"; \
52 export PATH; \
53 $(HELP2MAN) \
54 --include=$*.x \
55 --include=$(srcdir)/man/common.x \
56 --source='$(PACKAGE_STRING)' \
57 --output=$@.t `echo '$*' | sed 's,.*/,,'`
58 if sed $(remove_time_stamp) $@ >$@a.t 2>/dev/null && \
59 sed $(remove_time_stamp) $@.t | cmp $@a.t - >/dev/null 2>&1; then \
60 touch $@; \
61 else \
62 mv $@.t $@; \
64 rm -f $@*.t