Hi Ralf,
recently I have reported two automake problems #533 and #535 (#534
duplicates #533, my mistake) with patch and test case.
They have been assigned to Alexandre Duret-Lutz <a...@gnu.org>, but according
to the git log his last activity was in June 2006. Maybe you can have a
look.
533: applies equally to git master and branch 1.10, but may need some
refinement.
535: applies to git master, but an analogous change ought to be applied to
branch 1.10. I promised a second patch for that but couldn't convince
automake-gnats to accept another attachment. Thus I attach it here.
Regards
Peter Breitenlohner <p...@mppmu.mpg.de>
diff -ur -N -x 'automake.info*' -x version.texi -x stamp-vti
automake-1.10.2.orig/ChangeLog automake-1.10.2/ChangeLog
--- automake-1.10.2.orig/ChangeLog 2008-11-23 09:36:41.000000000 +0100
+++ automake-1.10.2/ChangeLog 2009-02-02 15:27:42.000000000 +0100
@@ -1,3 +1,9 @@
+2009-02-02 Peter Breitenlohner <p...@mppmu.mpg.de>
+
+ Extract correct man section from files in MAN_MANS.
+ * lib/am/mans.am: Extract correct man section.
+ * tests/Makefile.am, tests/man5.test: New test case.
+
2008-11-23 Ralf Wildenhues <ralf.wildenh...@gmx.de>
* configure.ac, NEWS: Bump version to 1.10.2.
diff -ur -N -x 'automake.info*' -x version.texi -x stamp-vti
automake-1.10.2.orig/lib/am/mans.am automake-1.10.2/lib/am/mans.am
--- automake-1.10.2.orig/lib/am/mans.am 2008-11-23 09:29:00.000000000 +0100
+++ automake-1.10.2/lib/am/mans.am 2009-02-02 15:36:06.000000000 +0100
@@ -37,9 +37,9 @@
## This must be done dynamically to support conditionals.
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
- case "$$i" in \
-## Have to accept files like `foo.1c'.
- *.%SECTION%*) list="$$list $$i" ;; \
+## Have to accept (for man1) files like `foo.1c' but not `sub.1/foo.2' or
`foo-2.1.4'.
+ case `echo $$i | sed -e 's,.*\.,,'` in \
+ %SECTION%*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
@@ -77,9 +77,9 @@
## This must be done dynamically to support conditionals.
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
- case "$$i" in \
-## Have to accept files like `foo.1c'.
- *.%SECTION%*) list="$$list $$i" ;; \
+## Have to accept (for man1) files like `foo.1c' but not `sub.1/foo.2' or
`foo-2.1.4'.
+ case `echo $$i | sed -e 's,.*\.,,'` in \
+ %SECTION%*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
diff -ur -N -x 'automake.info*' -x version.texi -x stamp-vti
automake-1.10.2.orig/tests/Makefile.am automake-1.10.2/tests/Makefile.am
--- automake-1.10.2.orig/tests/Makefile.am 2008-11-23 09:29:00.000000000
+0100
+++ automake-1.10.2/tests/Makefile.am 2009-02-02 15:28:59.000000000 +0100
@@ -369,6 +369,7 @@
man.test \
man2.test \
man3.test \
+man5.test \
mclean.test \
mdate.test \
mdate2.test \
diff -ur -N -x 'automake.info*' -x version.texi -x stamp-vti
automake-1.10.2.orig/tests/Makefile.in automake-1.10.2/tests/Makefile.in
--- automake-1.10.2.orig/tests/Makefile.in 2008-11-23 09:37:12.000000000
+0100
+++ automake-1.10.2/tests/Makefile.in 2009-02-02 15:29:00.000000000 +0100
@@ -502,6 +502,7 @@
man.test \
man2.test \
man3.test \
+man5.test \
mclean.test \
mdate.test \
mdate2.test \
diff -ur -N -x 'automake.info*' -x version.texi -x stamp-vti
automake-1.10.2.orig/tests/man5.test automake-1.10.2/tests/man5.test
--- automake-1.10.2.orig/tests/man5.test 1970-01-01 01:00:00.000000000
+0100
+++ automake-1.10.2/tests/man5.test 2009-02-02 15:30:26.000000000 +0100
@@ -0,0 +1,47 @@
+#! /bin/sh
+# Copyright (C) 2009 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure to extract the correct mansection from files in man_MANS.
+
+. ./defs || Exit 1
+
+set -e
+
+echo AC_OUTPUT >> configure.in
+
+cat > Makefile.am << 'END'
+man_MANS = foo-1.4.5/foo.2 foo-1.4.5/bar.4 baz-1.4.2
+END
+
+mkdir foo-1.4.5
+
+: > foo-1.4.5/foo.2
+: > foo-1.4.5/bar.4
+: > baz-1.4.2
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+# Let's play with $DESTDIR too, it shouldn't hurt.
+./configure --prefix='' --mandir=/man
+DESTDIR="`pwd`/_inst" $MAKE -e install
+
+test -f ./_inst/man/man2/foo.2
+test -f ./_inst/man/man2/baz-1.4.2
+test -f ./_inst/man/man4/bar.4
+test ! -f ./_inst/man/man4/foo.4
+test ! -f ./_inst/man/man4/baz-1.4.4