diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-06-08 17:36:07 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-06-12 10:28:17 +0200 |
commit | 0164f83126647476cfb3112441185accdcb157fb (patch) | |
tree | 560d0dcaef3f6933c9cce9144b60b1baea4368fc /t/suffix-extra-c-stuff-pr14560.sh | |
parent | 2d6fec692f032ab60c27f5c22391ae87e49c53c7 (diff) | |
download | automake-0164f83126647476cfb3112441185accdcb157fb.tar.gz |
tests: expose automake bug#14560
Automake needlessly generates definition of make variables related
to C compilation when two or more user-defined suffix rules are
present in a single Makefile.am.
* t/suffix-extra-c-stuff-pr14560.sh: New test, exposing the bug.
This test is still xfailing.
* t/no-extra-c-stuff.sh: New test, check for a potential related
regression. This regression is not actually present here (so this
test passes), but it still took place in our first attempt at
fixing bug#14560 -- so this test has proven to be actually useful.
* t/no-extra-makefile-code.sh: Improve comments, and tighten the
grepping checks a little.
* t/list-of-tests.mk (handwritten_TESTS): Add the new tests.
(XFAIL_TESTS): Add the new xfailing test.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 't/suffix-extra-c-stuff-pr14560.sh')
-rw-r--r-- | t/suffix-extra-c-stuff-pr14560.sh | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/t/suffix-extra-c-stuff-pr14560.sh b/t/suffix-extra-c-stuff-pr14560.sh new file mode 100644 index 000000000..45fdd1774 --- /dev/null +++ b/t/suffix-extra-c-stuff-pr14560.sh @@ -0,0 +1,37 @@ +#! /bin/sh +# Copyright (C) 2013 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/>. + +# Automake bug#14560: if multiple user-specified suffix rules were +# present, Automake could generate useless definitions and rules +# related to C compilation. + +. test-init.sh + +cat > Makefile.am <<'END' +.foo.bar: + foo2bar -o $@ $< +.baz.qux: + baz2qux -o $@ $< +bin_SCRIPTS = a.bar b.qux +END + +$ACLOCAL +$AUTOCONF +$AUTOMAKE + +$EGREP '\$\(CC\)|COMPILE|AM_V_CC|-compile|INCLUDES' Makefile.in && exit 1 + +: |