It is absolutely counterproductive to have an embedded perl documentation (that once was used to produce a manpage) and an independently modified scriptreplay.1 manpage. Of course, one could scratch the embedded perl documentation, but that would probably be against the wish of the origal author. The attached patch (1) updates the embedded perl documentation to the current manpage status (availability paragraph) and corrects some typos and formatting glitches, and (2) arranges to rebuild the manpage when necessary. Signed-off-by: Peter Breitenlohner <peb@xxxxxxxxxxxx>
It is absolutely counterproductive to have an embedded perl documentation (that once was used to produce a manpage) and an independently modified scriptreplay.1 manpage. Of course, one could scratch the embedded perl documentation, but that would probably be against the wish of the origal author. The present patch (1) updates the embedded perl documentation to the current manpage status (availability paragraph) and corrects some typos and formatting glitches, and (2) arranges to rebuild the manpage when necessary. Notes: (1) The generated manpage should certainly be distributed (for users without pod2man, although they probably also don't have perl and would need neither the perl script nor the manpage). (2) Due to a bug in automake-1.10 and earlier, the distributed manpage in the source tree gets installed, even if a newer one exists in the build tree (in a VPATH build with ${srcdir} != .). This bug has been reported some time ago (nr. 516), together with a quite small and obvious patch, but so far no reaction. diff -ur -x Makefile.in -x '*.m4' -x configure -x autom4te.cache -x Makevars.template util-linux-ng-2.13.orig/configure.ac util-linux-ng-2.13/configure.ac --- util-linux-ng-2.13.orig/configure.ac 2007-08-28 00:39:59.000000000 +0200 +++ util-linux-ng-2.13/configure.ac 2007-11-08 14:27:11.000000000 +0100 @@ -28,6 +28,8 @@ AC_GNU_SOURCE AC_PATH_PROG(PERL, perl) +AC_PATH_PROG(POD2MAN, pod2man) +AM_CONDITIONAL(HAVE_POD2MAN, test x$POD2MAN != x) AC_PATH_PROG(BLKID, blkid, [], [$PATH:/sbin]) AC_PATH_PROG(VOLID, vol_id, [], [$PATH:/lib/udev]) diff -ur -x Makefile.in -x '*.m4' -x configure -x autom4te.cache -x Makevars.template util-linux-ng-2.13.orig/misc-utils/Makefile.am util-linux-ng-2.13/misc-utils/Makefile.am --- util-linux-ng-2.13.orig/misc-utils/Makefile.am 2007-08-27 15:00:34.000000000 +0200 +++ util-linux-ng-2.13/misc-utils/Makefile.am 2007-11-08 14:42:24.000000000 +0100 @@ -76,6 +76,16 @@ endif endif +if HAVE_POD2MAN +# Due to a bug (nr. 516) in automake-1.10 and earlier, manpages in the +# source tree are installed in preference to those in the build tree. +# Therefore we have to put the regenerated manpage (reluctantly) into +# the source tree. +# Fortunately, this rule is not used if the distribution is up to date. +scriptreplay.1: scriptreplay.pl $(top_srcdir)/configure.ac + $(POD2MAN) -c "Linux Programmer's Manual" -r "$(PACKAGE_STRING)" $< $(srcdir)/$@ +endif + noinst_PROGRAMS = cal_test cal_test_SOURCES = cal.c cal_test_CPPFLAGS = -DTEST_CAL $(AM_CPPFLAGS) diff -ur util-linux-ng-2.13.orig/misc-utils/scriptreplay.pl util-linux-ng-2.13/misc-utils/scriptreplay.pl --- util-linux-ng-2.13.orig/misc-utils/scriptreplay.pl 2007-04-25 14:43:38.000000000 +0200 +++ util-linux-ng-2.13/misc-utils/scriptreplay.pl 2007-11-08 11:39:20.000000000 +0100 @@ -10,7 +10,7 @@ =head1 SYNOPSIS -scriptreplay timingfile [typescript [divisor]] +B<scriptreplay> I<timingfile> [I<typescript> [I<divisor>]] =head1 DESCRIPTION @@ -19,13 +19,13 @@ was recorded. It is only guaranteed to work properly if run on the same terminal the script was recorded on. -The timings information is what script outputs to standard error if it is +The timing information is what B<script>(1) outputs to standard error if it is run with the -t parameter. By default, the typescript to display is assumed to be named "typescript", but other filenames may be specified, as the second parameter. -If the third parameter exits, it is used as a time divisor. For example, +If the third parameter exists, it is used as a time divisor. For example, specifying a divisor of 2 makes the script be replayed twice as fast. =head1 EXAMPLE @@ -71,7 +71,7 @@ =head1 SEE ALSO -script(1) +B<script>(1) =head1 COPYRIGHT @@ -81,3 +81,7 @@ Joey Hess <joey@xxxxxxxxxxx> +=head1 AVAILABILITY + +The scriptreplay command is part of the util-linux-ng package and is available from +ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.