1 ## Makefile.am - template for generating Makefile via Automake
3 ## Copyright (C) 2006-2011 Free Software Foundation, Inc.
5 ## This file is part of GNU M4.
7 ## GNU M4 is free software: you can redistribute it and/or modify
8 ## it under the terms of the GNU General Public License as published by
9 ## the Free Software Foundation, either version 3 of the License, or
10 ## (at your option) any later version.
12 ## GNU M4 is distributed in the hope that it will be useful,
13 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ## GNU General Public License for more details.
17 ## You should have received a copy of the GNU General Public License
18 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
20 ## This file written by Eric Blake <ebb9@byu.net>
22 info_TEXINFOS = m4.texinfo
23 m4_TEXINFOS = fdl-1.3.texi gpl-3.0.texi
24 man_MANS = $(srcdir)/m4.1
25 EXTRA_DIST = $(man_MANS) gendocs_template
26 MAINTAINERCLEANFILES = $(man_MANS) gendocs_template
28 HELP2MAN = $(SHELL) $(top_srcdir)/build-aux/missing --run help2man
30 # Depend on ../.version for version, m4.c for usage text. Do not depend on
31 # built m4 executable, since not everyone has help2man or perl.
32 # Build the man page once in the srcdir, rather than in every VPATH build
33 # dir, to match how automake builds info pages. This is safe for 'make
34 # distcheck' since it is distributed pre-built.
35 $(srcdir)/m4.1: $(top_srcdir)/.version $(top_srcdir)/src/m4.c
36 @if test -x ../src/m4$(EXEEXT) ; then \
37 echo "Updating man page m4.1" ; \
38 $(HELP2MAN) --name="macro processor" --source='$(PACKAGE_STRING)' \
39 --info-page=m4 --output=$@ ../src/m4$(EXEEXT) ; \
41 echo "WARNING: The \`man' page \`$@' cannot be updated yet."; \
42 echo " Retry once the program executable is ready."; \