]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
coverage: expose automake bug#10128
authorStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 2 Jan 2012 19:32:54 +0000 (20:32 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 3 Jan 2012 17:43:33 +0000 (18:43 +0100)
* tests/objext-pr10128.test: New test, still expected to fail.
* tests/Makefile.am (TESTS, XFAIL_TESTS): Add it.

tests/Makefile.am
tests/objext-pr10128.test [new file with mode: 0755]

index 3d2087186c64973fae1065fb7fb054747badd85f..ff564427102a78e359412b4fc46090d1706d7b68 100644 (file)
@@ -25,6 +25,7 @@ dist-auxfile.test \
 dist-auxfile-2.test \
 gcj6.test \
 java-nobase.test \
+objext-pr10128.test \
 pr8365-remake-timing.test \
 lex-subobj-nodep.test \
 remake-am-pr10111.test \
@@ -614,6 +615,7 @@ notrans.test \
 number.test \
 objc.test \
 objc2.test \
+objext-pr10128.test \
 obsolete.test \
 order.test \
 outdir.test \
diff --git a/tests/objext-pr10128.test b/tests/objext-pr10128.test
new file mode 100755 (executable)
index 0000000..0692164
--- /dev/null
@@ -0,0 +1,60 @@
+#! /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/>.
+
+# Test for automake bug#10128: $(OBJEXT) redefinition causes
+# $(foo_OBJECTS) to be defined as empty.
+
+. ./defs || Exit 1
+
+set -e
+
+echo AC_OUTPUT >> configure.in
+
+cat > Makefile.am <<'END'
+LINK = echo >$@ Linked $@ from
+OBJEXT = fasl
+EXEEXT =
+
+noinst_PROGRAMS = foo zardoz
+foo_SOURCES = foo.lisp
+zardoz_SOURCES = mu1.lisp mu2.lisp
+
+## Un-commenting this is enough to make the test pass.  Weird!
+##.lisp.o:
+
+.lisp.fasl:
+       touch $@
+
+.PHONY: test
+test:
+       test '$(foo_OBJECTS)'    = 'foo.fasl'
+       test '$(zardoz_OBJECTS)' = 'mu1.fasl mu2.fasl'
+END
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+./configure
+$MAKE test
+touch foo.lisp mu1.lisp mu2.lisp
+$MAKE all
+cat foo
+cat zardoz
+test "`cat foo`"    = "Linked foo from foo.fasl"
+test "`cat zardoz`" = "Linked zardoz from mu1.fasl mu2.fasl"
+
+: