summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@unixuser.org>2012-03-12 11:46:04 +0100
committerStefano Lattarini <stefano.lattarini@gmail.com>2012-03-12 11:49:28 +0100
commitb153660787dd7dea409ad969c29393c105e13bf2 (patch)
treed9aaa2d89f6fe91bdc36ed00f79eef95245c7531
parent370e5775c20872a8f2b5c1e520b31dc1544b9cd8 (diff)
downloadautomake-b153660787dd7dea409ad969c29393c105e13bf2.tar.gz
coverage: expose automake bug#10997
* 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>
-rw-r--r--tests/Makefile.am1
-rw-r--r--tests/instdir-cond.test49
-rw-r--r--tests/list-of-tests.mk1
3 files changed, 51 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index b8ede3086..9cac904a1 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -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
index 000000000..8d83f8826
--- /dev/null
+++ b/tests/instdir-cond.test
@@ -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
+
+:
diff --git a/tests/list-of-tests.mk b/tests/list-of-tests.mk
index 023bf3bc6..7fd037673 100644
--- a/tests/list-of-tests.mk
+++ b/tests/list-of-tests.mk
@@ -459,6 +459,7 @@ instdat.test \
instdat2.test \
instdir.test \
instdir2.test \
+instdir-cond.test \
instdir-java.test \
instdir-lisp.test \
instdir-ltlib.test \