* tests/colneq.test: Check for this warning.
2002-09-08 Alexandre Duret-Lutz <duret_g@epita.fr>
+ * automake.in (macro_define): Warn about `:=' assignments.
+ * tests/colneq.test: Check for this warning.
+
* automake.texi (Include): Fragments are always distributed.
* NEWS: Likewise.
"$var: variable names starting with `_' are not portable")
if $var =~ /^_/;
+ # `:='-style assignments are not acknowledged by POSIX. Moreover it
+ # has multiple meanings. In GNU make or BSD make it means "assign
+ # with immediate expansion", while in OSF make it is used for
+ # conditional assignments.
+ msg ('portability', $where, "`:='-style assignments are not portable")
+ if $type eq ':';
+
check_variable_expansions ($value, $where);
$cond ||= 'TRUE';
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-# Test that := definitions work.
+# Test that := definitions produce warnings, but otherwise work.
. ./defs || exit 1
+set -e
+
cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS = -Wno-portability
ICONS := $(wildcard *.xbm)
data_DATA = $(ICONS)
END
-$ACLOCAL || exit 1
+$ACLOCAL
+$AUTOMAKE 2> stderr && exit 1
+cat stderr
+grep ':=.*not portable' stderr
+
+echo 'AUTOMAKE_OPTIONS = -Wno-portability' >> Makefile.am
$AUTOMAKE
+grep 'ICONS :=' Makefile.in