+2010-11-30 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Improve and extend tests on `:=' variable assignments.
+ * tests/colneq.test: Avoid redundant use of variable assignments
+ in Makefile.am. Use command-line automake options instead of
+ editing AUTOMAKE_OPTIONS in Makefile.am. Make grepping of the
+ generated Makefile.in slightly stricter. Add a trailing `:'
+ command.
+ * tests/colneq2.test: Do not create unneeded dummy files. Run
+ also autoconf, ./configure and make. Add trailing `:' command.
+ * tests/colneq3.test: New test, similar to colneq.test, but
+ running also autoconf, ./configure and make.
+ * tests/Makefile.am (TESTS): Update.
+
2010-11-25 Stefano Lattarini <stefano.lattarini@gmail.com>
Fix spurious failures in `silent*.test' for $CC != gcc
clean2.test \
colneq.test \
colneq2.test \
+colneq3.test \
colon.test \
colon2.test \
colon3.test \
clean2.test \
colneq.test \
colneq2.test \
+colneq3.test \
colon.test \
colon2.test \
colon3.test \
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2003, 2010 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
cat > Makefile.am << 'END'
ICONS := $(wildcard *.xbm)
-data_DATA = $(ICONS)
END
$ACLOCAL
AUTOMAKE_fails
grep ':=.*not portable' stderr
-echo 'AUTOMAKE_OPTIONS = -Wno-portability' >> Makefile.am
-$AUTOMAKE
-grep 'ICONS :=' Makefile.in
+$AUTOMAKE -Wno-portability
+grep '^ICONS *:= *\$(wildcard \*\.xbm) *$' Makefile.in
+
+:
set -e
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
cat > Makefile.am << 'END'
t = a b c
EXTRA_DIST = $(t:=.test)
+.PHONY: test
+test:
+ test x'$(EXTRA_DIST)' = x'a.test b.test c.test'
END
-: > a.test
-: > b.test
-: > c.test
-
$ACLOCAL
+$AUTOCONF
$AUTOMAKE
+
+./configure
+$MAKE test
+
+:
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2010 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 that := definitions work as expected at make time.
+
+required=GNUmake
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+BAR := $(FOO)
+BAZ = $(FOO)
+FOO := foo
+.PHONY: test
+test:
+ test x'$(FOO)' = x'foo'
+ test x'$(BAZ)' = x'foo'
+ test x'$(BAR)' = x
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -Wno-portability
+
+./configure
+$MAKE test
+
+: