diff options
Diffstat (limited to 'gprofng/doc/Makefile.am')
-rw-r--r-- | gprofng/doc/Makefile.am | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/gprofng/doc/Makefile.am b/gprofng/doc/Makefile.am index 760c34f..8be0e92 100644 --- a/gprofng/doc/Makefile.am +++ b/gprofng/doc/Makefile.am @@ -19,9 +19,31 @@ AUTOMAKE_OPTIONS = info-in-builddir foreign no-texinfo.tex +# Options to extract the man page +MANCONF = -Dman + +TEXI2POD = perl $(srcdir)/../../etc/texi2pod.pl $(AM_MAKEINFOFLAGS) +POD2MAN = pod2man --center="User Commands" \ + --release="binutils-$(VERSION)" --section=1 + info_TEXINFOS = gprofng.texi gprofng_TEXINFOS = fdl.texi TEXINFO_TEX = . MAKEINFOHTML = $(MAKEINFO) --html --no-split -MAINTAINERCLEANFILES = gprofng.info +man_MANS = gprofng.1 + +# Build the man page from the texinfo file +# The sed command removes the no-adjust Nroff command so that +# the man output looks standard. +gprofng.1: $(srcdir)/gprofng.texi + $(AM_V_GEN)touch $@ + $(AM_V_at)-$(TEXI2POD) $(MANCONF) < $(srcdir)/gprofng.texi > gprofng.pod + $(AM_V_at)-($(POD2MAN) gprofng.pod | \ + sed -e '/^.if n .na/d' > $@.tmp && \ + mv -f $@.tmp $@) || (rm -f $@.tmp && exit 1) + $(AM_V_at)rm -f gprofng.pod + +MAINTAINERCLEANFILES = gprofng.info $(man_MANS) + +info: $(man_MANS) |