Tag
Hash :
cfa9415f
Author :
Date :
2002-03-21T09:11:56
* Makefile.am (maintainer-check): Check for misuses of make, autoconf, automake, aclocal, and perl in the testsuite. Suggest using $MAKE, $AUTOCONF, $AUTOMAKE, $ACLOCAL, and $PERL instead. * tests/confsub.test: Use $AUTOCONF and $MAKE. * tests/extra5.test, tests/extra6.test, tests/lex5.test, tests/nobase.test, tests/nodist2.test, tests/pr204.test, tests/pr224.test, tests/pr287.test, tests/strip.test, tests/yacc8.test: Use $MAKE.
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 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
#! /bin/sh
# Test for subdir lexers.
required='gcc make gzip'
. $srcdir/defs || exit 1
set -e
cat >> configure.in << 'END'
AC_CONFIG_AUX_DIR([.])
AC_PROG_CC
AM_PROG_CC_C_O
AM_PROG_LEX
AC_OUTPUT
END
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = foreign subdir-objects
LDADD = @LEXLIB@
bin_PROGRAMS = foo/foo
foo_foo_SOURCES = foo/foo.l
END
mkdir foo
cat > foo/foo.l << 'END'
%%
"END" return EOF;
.
%%
int
main ()
{
while (yylex () != EOF)
;
return 0;
}
END
set -e
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
mkdir sub
cd sub
../configure
$MAKE foo/foo.o
test -f foo/foo.c
test -f foo/foo.o
# Now, adds another lexer to test ylwrap.
cd ..
cp foo/foo.l foo/foo2.l
cat >> Makefile.am << 'END'
EXTRA_foo_foo_SOURCES = foo/foo2.l
END
$AUTOMAKE -a
test -f ./ylwrap
cd sub
$MAKE foo/foo2.o
test -f foo/foo2.c
test -f foo/foo2.o
exit 0