aboutsummaryrefslogtreecommitdiff
path: root/gprof/Makefile.in
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2001-04-06 12:13:40 +0000
committerAlan Modra <amodra@gmail.com>2001-04-06 12:13:40 +0000
commit40f905288f98ff9baaaea319e525ac176ffaff4e (patch)
tree15d4c5076df511500844e59533d240e45e22691a /gprof/Makefile.in
parenta250df2e356bc3f0a4607b814c6fc0e6aae85a0a (diff)
downloadgdb-40f905288f98ff9baaaea319e525ac176ffaff4e.zip
gdb-40f905288f98ff9baaaea319e525ac176ffaff4e.tar.gz
gdb-40f905288f98ff9baaaea319e525ac176ffaff4e.tar.bz2
man page generation from gprof.texi by Stephane Carrez
Diffstat (limited to 'gprof/Makefile.in')
-rw-r--r--gprof/Makefile.in18
1 files changed, 18 insertions, 0 deletions
diff --git a/gprof/Makefile.in b/gprof/Makefile.in
index 4cf26dc..aca0211 100644
--- a/gprof/Makefile.in
+++ b/gprof/Makefile.in
@@ -141,6 +141,12 @@ BUILT_SOURCES = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
POTFILES = $(sources) $(noinst_HEADERS)
+MANCONF = -Dman
+
+TEXI2POD = perl $(srcdir)/../etc/texi2pod.pl
+
+POD2MAN = pod2man --center="GNU" --release="binutils-$(VERSION)" --section=1
+
info_TEXINFOS = gprof.texi
man_MANS = gprof.1
@@ -716,6 +722,18 @@ po/POTFILES.in: @MAINT@ Makefile
for file in $(POTFILES); do echo $$file; done | sort > tmp \
&& mv tmp $(srcdir)/po/POTFILES.in
+# Build the man page from the texinfo file
+# The sed command removes the no-adjust Nroff command so that
+# the man output looks standard.
+$(srcdir)/gprof.1: $(srcdir)/gprof.texi
+ touch $(srcdir)/gprof.1
+ -$(TEXI2POD) $(MANCONF) -Dgprof < $(srcdir)/gprof.texi > gprof.pod
+ -($(POD2MAN) gprof.pod | \
+ sed -e '/^.if n .na/d' > $(srcdir)/gprof.1.T$$$$ && \
+ mv -f $(srcdir)/gprof.1.T$$$$ $(srcdir)/gprof.1) || \
+ (rm -f $(srcdir)/gprof.1.T$$$$ && exit 1)
+ rm -f gprof.pod
+
# Targets to rebuild dependencies in this Makefile.
# Have to get rid of DEP1 here so that "$?" later includes all sources.
DEP: dep.sed $(gprof_SOURCES) $(noinst_HEADERS) gconfig.h