Tag
Hash :
89598be4
Author :
Date :
2001-12-06T19:23:24
* tests/confsub.test, tests/depdist.test, tests/extra5.test, tests/nobase.test, tests/stamph2.test, tests/subdirbuiltsources.test: Require Autoconf.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
#! /bin/sh
# Test to make sure config.h can be in subdir.
# Also, make sure config.h is properly rebuilt.
. $srcdir/defs || exit 1
# Fail gracefully if no autoconf.
$needs_autoconf
cat > configure.in << 'END'
AC_INIT
AM_INIT_AUTOMAKE(nonesuch, nonesuch)
AM_CONFIG_HEADER(subdir/config.h:subdir/config.hin)
AC_OUTPUT(Makefile subdir/Makefile)
END
cat > Makefile.am << 'END'
SUBDIRS = subdir
END
mkdir subdir
cat > subdir/Makefile.am << 'END'
END
echo 'Before.' > subdir/config.hin
$ACLOCAL || exit 1
$AUTOMAKE || exit 1
# Make sure subdir Makefile.in doesn't itself look in the subdir.
# One line is allowed though:
#
# cd $(top_builddir) && $(SHELL) ./config.status subdir/config.h
(fgrep 'subdir/config.h' subdir/Makefile.in |
fgrep -v 'cd $(top_builddir)') && exit 1
autoconf || exit 1
./configure || exit 1
fgrep 'Before.' subdir/config.h
sleep 1
echo 'After.' > subdir/config.hin
make || exit 1
fgrep 'After.' subdir/config.h || exit 1
exit 0