]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Prefer generated manpages over distributed ones.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 22 Jan 2008 22:35:57 +0000 (23:35 +0100)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 22 Jan 2008 22:35:57 +0000 (23:35 +0100)
* 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.

ChangeLog
lib/am/mans.am
tests/Makefile.am
tests/Makefile.in
tests/man3.test [new file with mode: 0755]

index 7ccca023ee43ce8c502eb1cb09db8ab8110373e6..7b1f1501f19f998fff5028020363bbf9fe6f58ac 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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.
index b3e9053c47c6c7e8c2b6c3f4ce3d9feb81e9ddc8..42812543c750f4c5cd225d31c48a29c3392edb8b 100644 (file)
@@ -1,5 +1,5 @@
 ## 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
@@ -42,8 +42,8 @@ install-man%SECTION%: $(man%SECTION%_MANS) $(man_MANS)
        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 \
index db40acc9f103848ecdf67937d423899421f42ccc..796a34dd81314cfebd0c95a8c3ff249e11ca7a94 100644 (file)
@@ -371,6 +371,7 @@ makej.test \
 makevars.test \
 man.test \
 man2.test \
+man3.test \
 mclean.test \
 mdate.test \
 mdate2.test \
index ceff3f404ab4dda3ae91e3c57daa2d0b0ff9c7d7..219d4dd00cc0a078c95fd4942140d6b680541a47 100644 (file)
@@ -520,6 +520,7 @@ makej.test \
 makevars.test \
 man.test \
 man2.test \
+man3.test \
 mclean.test \
 mdate.test \
 mdate2.test \
diff --git a/tests/man3.test b/tests/man3.test
new file mode 100755 (executable)
index 0000000..2527e9c
--- /dev/null
@@ -0,0 +1,44 @@
+#! /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