3 # Test of yacc functionality, derived from GNU binutils
6 . $srcdir/defs || exit 1
8 cat > configure.in << 'END'
10 AM_INIT_AUTOMAKE(nonesuch, nonesuch)
17 cat > Makefile.am << 'END'
19 maude_SOURCES = sub/maude.y
27 $AUTOMAKE -a || exit 1
29 grep '^maude\.c:' Makefile.in || exit 1
32 ## Try again with subdir-objects.
34 cat > Makefile.am << 'END'
35 AUTOMAKE_OPTIONS = subdir-objects
37 maude_SOURCES = sub/maude.y
41 $AUTOMAKE -a || exit 1
43 grep '^sub/maude\.c:' Makefile.in || exit 1
46 ## Try again with per-exe flags.
48 cat > Makefile.am << 'END'
50 maude_SOURCES = sub/maude.y
51 ## A particularly trickey case.
56 $AUTOMAKE -a || exit 1
58 # Rule should use maude_YFLAGS.
59 grep 'AM_YFLAGS.*maude' Makefile.in && exit 1
62 grep 'maudec' Makefile.in && exit 1
64 # Make sure the .o file is required.
65 grep '^am_maude_OBJECTS.*maude' Makefile.in || exit 1