+2008-01-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * lib/am/mans.am (install-man%SECTION%): Prefer generated manpages
+ over distributed ones.
+ Report and patch by Peter Breitenlohner.
+ * tests/man3.test: New test.
+ * tests/Makefile.am: Update.
+
2008-01-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/tar.test: Skip if no appropriate tar was found.
## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1998, 2001, 2003, 2004, 2006 Free Software Foundation, Inc.
+## Copyright (C) 1998, 2001, 2003, 2004, 2006, 2008 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
done; \
for i in $$list; do \
## Find the file.
- if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
- else file=$$i; fi; \
+ if test -f $$i; then file=$$i; \
+ else file=$(srcdir)/$$i; fi; \
## Change the extension if needed.
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
case "$$ext" in \
makevars.test \
man.test \
man2.test \
+man3.test \
mclean.test \
mdate.test \
mdate2.test \
makevars.test \
man.test \
man2.test \
+man3.test \
mclean.test \
mdate.test \
mdate2.test \
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2008 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/>.
+
+# PR 516: Prefer generated manpages to distributed ones.
+
+. ./defs || exit 1
+
+set -e
+
+cat > Makefile.am << 'END'
+dist_man_MANS = foo.1
+installcheck-local:
+ grep bar "$(mandir)/man1/foo.1"
+END
+
+cat >>configure.in <<'END'
+: ${foo=foo}
+AC_SUBST([foo])
+AC_CONFIG_FILES([foo.1])
+AC_OUTPUT
+END
+
+cat > foo.1.in <<'END'
+@foo@
+END
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+./configure
+$MAKE distcheck DISTCHECK_CONFIGURE_FLAGS=foo=bar