corefile.h gmon.h gmon_io.h gmon_out.h gprof.h hertz.h hist.h \
search_list.h source.h sym_ids.h symtab.h utils.h
-EXTRA_DIST = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c bbconv.pl
-
BUILT_SOURCES = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
+EXTRA_DIST = $(BUILT_SOURCES) bbconv.pl $(man_MANS)
-diststuff: $(BUILT_SOURCES) info
+diststuff: $(BUILT_SOURCES) info $(man_MANS)
.m.c:
awk -f $(srcdir)/gen-c-prog.awk > ./$*.c \
for file in $(POTFILES); do echo $$file; done | sort > tmp \
&& mv tmp $(srcdir)/po/POTFILES.in
+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
+# Build the man page from the texinfo file
+# The sed command removes the no-adjust Nroff command so that
+# the man output looks standard.
+gprof.1: $(srcdir)/gprof.texi
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dgprof < $(srcdir)/gprof.texi > gprof.pod
+ -($(POD2MAN) gprof.pod | \
+ sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || \
+ (rm -f $@.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
rm -f DEP1
$(MAKE) MKDEP="$(MKDEP)" DEP1
- if grep ' /' DEP1 > /dev/null 2> /dev/null; then \
+ sed -f dep.sed < DEP1 > DEPA
+ echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA
+ if grep ' /' DEPA > /dev/null 2> /dev/null; then \
echo 'make DEP failed!'; exit 1; \
else \
- sed -f dep.sed < DEP1 > $@; \
- echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> $@; \
+ mv -f DEPA $@; \
fi
DEP1: $(gprof_SOURCES)
.PHONY: dep dep-in dep-am
-CLEANFILES = dep.sed DEP DEP1 DEP2
+CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
$(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
$(INCDIR)/bin-bugs.h basic_blocks.h source.h search_list.h \
symtab.h ../bfd/bfd.h call_graph.h cg_arcs.h cg_print.h \
- corefile.h gmon_io.h gmon.h hertz.h hist.h sym_ids.h
+ corefile.h gmon_io.h gmon.h hertz.h hist.h sym_ids.h \
+ $(INCDIR)/demangle.h
hertz.o: hertz.c hertz.h gprof.h $(INCDIR)/ansidecl.h \
$(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
$(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h