]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
coverage: expose automake bug#10997
authorDaiki Ueno <ueno@unixuser.org>
Mon, 12 Mar 2012 10:46:04 +0000 (11:46 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 12 Mar 2012 10:49:28 +0000 (11:49 +0100)
* tests/instdir-cond.test: New test.
* tests/list-of-tests.mk: Add it.
* tests/Makefile.am (XFAIL_TESTS): Likewise.

Copyright-paperwork-exempt: yes
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
tests/Makefile.am
tests/instdir-cond.test [new file with mode: 0644]
tests/list-of-tests.mk

index b8ede30868d6feb7172607e7e02bcdd11507fa42..9cac904a1a3f67c6aabf44379f04acd139eeb5c7 100644 (file)
@@ -25,6 +25,7 @@ dist-auxfile.test \
 dist-auxfile-2.test \
 dist-pr109765.test \
 gcj6.test \
+instdir-cond.test \
 java-nobase.test \
 objext-pr10128.test \
 pr8365-remake-timing.test \
diff --git a/tests/instdir-cond.test b/tests/instdir-cond.test
new file mode 100644 (file)
index 0000000..8d83f88
--- /dev/null
@@ -0,0 +1,49 @@
+#! /bin/sh
+# Copyright (C) 2012 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 2, 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/>.
+
+# Check against automake bug#10997: directories holding only
+# conditionally-installed files should not be created unconditionally.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AM_CONDITIONAL([ENABLE_FOO], [false])
+AC_OUTPUT
+END
+
+: > foo
+: > bar
+
+cat > Makefile.am << 'END'
+if ENABLE_FOO
+pkgdata_DATA = foo
+pkglibexec_SCRIPTS = bar
+endif
+END
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+./configure --prefix="`pwd`/inst"
+
+$MAKE install
+test ! -d inst/share/instdir-cond
+test ! -d inst/libexec/instdir-cond
+
+:
index 023bf3bc64ba292b3625ea453f744267bf870ff1..7fd037673e9a75f9fd02f3439d0d7727a8d6ffce 100644 (file)
@@ -459,6 +459,7 @@ instdat.test \
 instdat2.test \
 instdir.test \
 instdir2.test \
+instdir-cond.test \
 instdir-java.test \
 instdir-lisp.test \
 instdir-ltlib.test \