This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch to generate gcov manpage


On Sun, Nov 19, 2000 at 10:25:03PM +0000, Joseph S. Myers wrote:
> This patch uses texi2pod.pl (plus podlators 1.05) to create a manpage
> gcov.1.  This is mainly a trial of using texi2pod.pl for generating
> manpages other than cpp.1 (hopefully to be extended to generate gcc.1
> from invoke.texi), but the manpage should also be useful to some
> people in its own right.
...

> +TEXI2POD = $(srcdir)/../contrib/texi2pod.pl
> +POD2MAN = pod2man --center="GNU" --release="gcc-$(version)" --section=1

Needs to be predicated on the existence of Perl and pod2man.  And
therefore we need to continue shipping gcov.1 etc with release
bundles.

> +$(srcdir)/gcov.1: $(srcdir)/gcov.texi
> +	$(TEXI2POD) < $(srcdir)/gcov.texi > gcov.pod
> +	$(POD2MAN) gcov.pod > $(srcdir)/gcov.1
> +	rm -f gcov.pod

Not safe in the presence of simultaneous builds from the same
directory.  You need

	$(POD2MAN) gcov.pod >$(srcdir)/gcov.1.T$$; \
	if test $? -eq 0; \
	then mv -f $(srcdir)/gcov.1.T$$ $(srcdir)/gcov.1; \
	else rm -f $(srcdir)/gcov.1.T$$; \
	fi

(If anyone knows a shorter way to write that I'd be delighted to know.)

zw

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]