From b106270a53c1aaa230ef435b52415ea8da331082 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Sat, 13 Apr 2002 21:48:34 +0000 Subject: [PATCH] * tests/man2.test: New file. * tests/Makefile.am (TESTS): Add man2.test. * lib/am/mans.am (install-man%SECTION%): Change the extension of the man pages being installed, as documented. --- ChangeLog | 7 +++++++ lib/am/mans.am | 7 ++++++- tests/Makefile.am | 1 + tests/Makefile.in | 1 + tests/man2.test | 31 +++++++++++++++++++++++++++++++ 5 files changed, 46 insertions(+), 1 deletion(-) create mode 100755 tests/man2.test diff --git a/ChangeLog b/ChangeLog index 1ca8e2ec..8a4738db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2002-04-13 Alexandre Duret-Lutz + + * tests/man2.test: New file. + * tests/Makefile.am (TESTS): Add man2.test. + * lib/am/mans.am (install-man%SECTION%): Change the extension + of the man pages being installed, as documented. + 2002-04-13 Alexandre Duret-Lutz Enable traces; wipe out the old configure.in parser. diff --git a/lib/am/mans.am b/lib/am/mans.am index 21838e97..b6fa21aa 100644 --- a/lib/am/mans.am +++ b/lib/am/mans.am @@ -46,9 +46,14 @@ install-man%SECTION%: $(man%SECTION%_MANS) $(man_MANS) ## Find the file. if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ +## Change the extension if needed. + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + %SECTION%*) ;; \ + *) ext='%SECTION%' ;; \ + esac; \ ## Extract basename of man page and run it through the program rename ## transform. - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ diff --git a/tests/Makefile.am b/tests/Makefile.am index 24a528e0..cec29a44 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -212,6 +212,7 @@ ltlibobjs.test \ make.test \ makevars.test \ man.test \ +man2.test \ mclean.test \ mdate.test \ mdate2.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index d0696cf2..717ac2a9 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -296,6 +296,7 @@ ltlibobjs.test \ make.test \ makevars.test \ man.test \ +man2.test \ mclean.test \ mdate.test \ mdate2.test \ diff --git a/tests/man2.test b/tests/man2.test new file mode 100755 index 00000000..28ddb86b --- /dev/null +++ b/tests/man2.test @@ -0,0 +1,31 @@ +#! /bin/sh + +# Make sure that man pages listed in man_MANS are installed and +# renamed as documented. + +. $srcdir/defs || exit 1 + +set -e + +echo AC_OUTPUT >> configure.in + +cat > Makefile.am << 'END' +man_MANS = foo.2 +man4_MANS = foo.4 bar.man +END + +: > foo.2 +: > foo.4 +: > bar.man + +$ACLOCAL +$AUTOCONF +$AUTOMAKE + +# Let's play with $DESTDIR too, it shouldn't hurt. +./configure --prefix='' +$MAKE DESTDIR=$PWD/=inst install + +test -f ./=inst/man/man2/foo.2 +test -f ./=inst/man/man4/foo.4 +test -f ./=inst/man/man4/bar.4 -- 2.43.5