>From b153660787dd7dea409ad969c29393c105e13bf2 Mon Sep 17 00:00:00 2001 Message-Id: From: Daiki Ueno Date: Mon, 12 Mar 2012 11:46:04 +0100 Subject: [PATCH] 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 --- tests/Makefile.am | 1 + tests/instdir-cond.test | 49 +++++++++++++++++++++++++++++++++++++++++++++++ tests/list-of-tests.mk | 1 + 3 files changed, 51 insertions(+), 0 deletions(-) create mode 100644 tests/instdir-cond.test diff --git a/tests/Makefile.am b/tests/Makefile.am index b8ede30..9cac904 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 0000000..8d83f88 --- /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 . + +# 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 023bf3b..7fd0376 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 \ -- 1.7.9