#! /bin/sh # Test that substitutions in variables work. # From Lars J. Aas. . $srcdir/defs || exit 1 cat > configure.in << 'END' AC_INIT(fakelib.c) AM_INIT_AUTOMAKE(fakelib,0.0) AC_PROG_CC RANLIB=: AC_SUBST(RANLIB) SUBST=hei AC_SUBST(SUBST) AC_OUTPUT(Makefile) END cat > Makefile.am << 'END' noinst_LIBRARIES = libfake@SUBST@.a libfake@SUBST@_a_SOURCES = abra.c kadabra.c # then we override the target rule: libfake@SUBST@.a: Makefile $(libfake@SUBST@_a_OBJECTS) $(libfake@SUBST@_a_DEPENDENCIES) @echo here we do some custom stuff, instead of invoking the linker END set -e $ACLOCAL $AUTOMAKE num=`grep '^libfake@SUBST@.a:' Makefile.in | wc -l` test $num -eq 1