From: Tom Tromey Date: Tue, 27 Feb 2001 04:16:38 +0000 (+0000) Subject: 2001-02-25 Alexandre Duret-Lutz X-Git-Tag: handle-languages~214 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=8941c9eeeb1e7e960ae8d68dddf19416fa48dd07;p=automake.git 2001-02-25 Alexandre Duret-Lutz * tests/Makefile.am (TESTS): Added yaccvpath.test. * tests/yaccvpath.test: New file. --- diff --git a/ChangeLog b/ChangeLog index f97c2c43..715142b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-02-25 Alexandre Duret-Lutz + + * tests/Makefile.am (TESTS): Added yaccvpath.test. + * tests/yaccvpath.test: New file. + 2001-02-26 Akim Demaille * automake.in (&am_install_var): Recognize whether predefined diff --git a/tests/Makefile.am b/tests/Makefile.am index c2a270d9..f208d722 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -276,7 +276,8 @@ xsource.test \ yacc.test \ yacc2.test \ yacc3.test \ -yaccpp.test +yaccpp.test \ +yaccpvath.test EXTRA_DIST = defs ChangeLog-old $(TESTS) diff --git a/tests/Makefile.in b/tests/Makefile.in index 42f4c867..c99c2ab7 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -352,7 +352,8 @@ xsource.test \ yacc.test \ yacc2.test \ yacc3.test \ -yaccpp.test +yaccpp.test \ +yaccpvath.test EXTRA_DIST = defs ChangeLog-old $(TESTS) diff --git a/tests/yaccvpath.test b/tests/yaccvpath.test new file mode 100755 index 00000000..ce4645b0 --- /dev/null +++ b/tests/yaccvpath.test @@ -0,0 +1,66 @@ +#! /bin/sh + +# This attempts to `make distcheck' from a separate directory +# (i.e. builddir!=srcdir). Before doing `make distcheck' a parser +# definition is updated in the srcdir in order to check whether the +# archived perser is up-to-date or not. + +. $srcdir/defs || exit 1 + +cat > configure.in << 'END' +AC_INIT +AM_INIT_AUTOMAKE(foo, 0.1) +PACKAGE=foo +VERSION=0.1 +AC_PROG_CC +AC_PROG_YACC +AC_OUTPUT(Makefile) +END + +cat > Makefile.am << 'END' +bin_PROGRAMS= foo +foo_SOURCES= parse.y foo.c +END + +cat > parse.y << 'END' +%{ +int yylex () {return 0;} +void yyerror (char *s) {} +%} +%% +foobar : 'f' 'o' 'o' 'b' 'a' 'r' {}; +END + +cat > foo.c << 'END' +int main () { return 0; } +END + +# Fail gracefully if no autoconf. +$needs_autoconf +# Likewise for gcc. +(gcc -v) > /dev/null 2>&1 || exit 77 + +# Remove some files installed by defs. +# They will be reinstalled by automake. +rm -f install-sh missing mkinstalldirs + +set -e + +$ACLOCAL +$AUTOCONF +$AUTOMAKE -a + +./configure +$MAKE +$MAKE distclean +# this should left parse.c in the current directory + +cat >> parse.y << 'END' +fubar : 'f' foobar {}; +END + +mkdir sub +cd sub +../configure +$MAKE +$MAKE distcheck