summaryrefslogtreecommitdiff
path: root/tests/substref.test
diff options
context:
space:
mode:
authorRichard Boulton <richard@tartarus.org>2001-08-03 11:57:16 +0000
committerRichard Boulton <richard@tartarus.org>2001-08-03 11:57:16 +0000
commit5cc47615a2f128034e767f9f62bb2e3ab2f2103e (patch)
tree70daf5e1676e2a5203d07cccec82bd68981d7e3a /tests/substref.test
parentf00ec2842b04fb937550074fdec93f0f81c83c80 (diff)
downloadautomake-5cc47615a2f128034e767f9f62bb2e3ab2f2103e.tar.gz
2001-08-03 Richard Boulton <richard@tartarus.org>
* automake.in (value_to_list): Check for whether $from is defined, rather than whether it is true, so that empty $froms are allowed in substitution reference patterns. * tests/substref.test: New file: test behavior of substitution references when the $from side of the substitution is empty. * tests/Makefile.am (TESTS): Added substref.test.
Diffstat (limited to 'tests/substref.test')
-rwxr-xr-xtests/substref.test46
1 files changed, 46 insertions, 0 deletions
diff --git a/tests/substref.test b/tests/substref.test
new file mode 100755
index 000000000..750a40408
--- /dev/null
+++ b/tests/substref.test
@@ -0,0 +1,46 @@
+#! /bin/sh
+
+# Test for bug in variable substitution references when left hand pattern is
+# null.
+# Report from Richard Boulton
+
+. $srcdir/defs || exit 1
+
+cat > configure.in << 'END'
+AC_INIT(hello.c)
+AM_INIT_AUTOMAKE(hello,0.23)
+AC_PROG_CC
+AC_OUTPUT(Makefile)
+END
+
+cat > hello.c << 'END'
+END
+
+cat > Makefile.am << 'END'
+
+var1 = dlmain
+
+var2 = $(var1:=.)
+
+helldl_SOURCES = $(var2:=c)
+
+echorule:
+ @echo $(helldl_SOURCES) $(helldl_OBJECTS)
+
+bin_PROGRAMS = helldl
+END
+
+$needs_autoconf
+(gcc -v) > /dev/null 2>&1 || exit 77
+
+set -e
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+CC='gcc' ./configure
+
+val=`$MAKE echorule`;
+echo $val
+test "x$val" = "xdlmain.c dlmain.o"