* configure.in: Upped to version 1.4k.
[automake.git] / tests / substtarg.test
blobded02849a0e00a642a5c77ffd174048e082dd31e
1 #! /bin/sh
3 # Test that substitutions in variables work.
4 # From Lars J. Aas.
6 . $srcdir/defs || exit 1
8 cat > configure.in << 'END'
9 AC_INIT(fakelib.c)
10 AM_INIT_AUTOMAKE(fakelib,0.0)
11 AC_PROG_CC
12 RANLIB=:
13 AC_SUBST(RANLIB)
14 SUBST=hei
15 AC_SUBST(SUBST)
16 AC_OUTPUT(Makefile)
17 END
19 cat > Makefile.am << 'END'
20 noinst_LIBRARIES = libfake@SUBST@.a
22 libfake@SUBST@_a_SOURCES = abra.c kadabra.c
24 # then we override the target rule:
25 libfake@SUBST@.a: Makefile $(libfake@SUBST@_a_OBJECTS) $(libfake@SUBST@_a_DEPENDENCIES)
26 @echo here we do some custom stuff, instead of invoking the linker
27 END
29 set -e
31 $ACLOCAL
32 $AUTOMAKE
33 num=`grep '^libfake@SUBST@.a:' Makefile.in | wc -l`
34 test $num -eq 1