summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Duret-Lutz <adl@gnu.org>2002-04-13 21:48:35 +0000
committerAlexandre Duret-Lutz <adl@gnu.org>2002-04-13 21:48:35 +0000
commita8635b12bdb0992ede3b15d49774f082d1005651 (patch)
tree0d094cbc9029532dff207dd9bea84cfa5daf8240
parentc9c536afe3a3e05524731d111634952148678af1 (diff)
downloadautomake-a8635b12bdb0992ede3b15d49774f082d1005651.tar.gz
* 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.
-rw-r--r--ChangeLog7
-rw-r--r--lib/am/mans.am7
-rw-r--r--tests/Makefile.am1
-rw-r--r--tests/Makefile.in1
-rwxr-xr-xtests/man2.test31
5 files changed, 46 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1ca8e2ec3..8a4738dbb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2002-04-13 Alexandre Duret-Lutz <duret_g@epita.fr>
+ * 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 <duret_g@epita.fr>
+
Enable traces; wipe out the old configure.in parser.
* automake.in (scan_autoconf_traces): Use '$ENF{AUTOCONF}' of
diff --git a/lib/am/mans.am b/lib/am/mans.am
index 21838e97d..b6fa21aa5 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 24a528e07..cec29a447 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 d0696cf21..717ac2a9a 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 000000000..28ddb86bd
--- /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