diff options
Diffstat (limited to 'doc/Makefile.am')
-rw-r--r-- | doc/Makefile.am | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am index 92337649..9d3391d4 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,6 +1,6 @@ ## Makefile.am - template for generating Makefile via Automake ## -## Copyright (C) 2009, 2010 Free Software Foundation, Inc. +## Copyright (C) 2006-2011 Free Software Foundation, Inc. ## ## This file is part of GNU M4. ## @@ -16,29 +16,28 @@ ## ## You should have received a copy of the GNU General Public License ## along with this program. If not, see <http://www.gnu.org/licenses/>. +## +## This file written by Eric Blake <ebb9@byu.net> -MAINTAINERCLEANFILES = -EXTRA_DIST = -config_aux_dir = build-aux - -info_TEXINFOS = m4.texinfo -m4_TEXINFOS = regexprops-generic.texi fdl-1.3.texi gpl-3.0.texi -dist_man_MANS = $(srcdir)/m4.1 -EXTRA_DIST += gendocs_template -MAINTAINERCLEANFILES += gendocs_template -HELP2MAN = $(SHELL) $(top_srcdir)/$(config_aux_dir)/missing --run help2man +info_TEXINFOS = m4.texinfo +m4_TEXINFOS = fdl-1.3.texi gpl-3.0.texi +man_MANS = $(srcdir)/m4.1 +EXTRA_DIST = $(man_MANS) gendocs_template +MAINTAINERCLEANFILES = $(man_MANS) gendocs_template +SUFFIXES = .1 +HELP2MAN = $(SHELL) $(top_srcdir)/build-aux/missing --run help2man +# Depend on ../.version for version, m4.c for usage text. Do not depend on +# built m4 executable, since not everyone has help2man or perl. # Build the man page once in the srcdir, rather than in every VPATH build # dir, to match how automake builds info pages. This is safe for 'make # distcheck' since it is distributed pre-built. -$(srcdir)/m4.1: ../.version $(srcdir)/../src/main.c - @echo "Updating the \`man' page \`$@'"; \ - $(HELP2MAN) --name="macro processor" --source=FSF \ - --info-page=m4 --output=$@ ../src/m4$(EXEEXT) - -TAGS_FILES = $(infos_TEXINFOS) -TAGS_DEPENDENCIES = $(TAGS_FILES) -ETAGS_ARGS = --language=none --regex='/@node \([^,]*\)/\1/' $(TAGS_FILES) - -MAINTAINERCLEANFILES += $(dist_man_MANS) - +$(srcdir)/m4.1: $(top_srcdir)/.version $(top_srcdir)/src/m4.c + @if test -x ../src/m4$(EXEEXT) ; then \ + echo "Updating man page m4.1" ; \ + $(HELP2MAN) --name="macro processor" --source='$(PACKAGE_STRING)' \ + --info-page=m4 --output=$@ ../src/m4$(EXEEXT) ; \ + else \ + echo "WARNING: The \`man' page \`$@' cannot be updated yet."; \ + echo " Retry once the program executable is ready."; \ + fi |