* automake.texi (Macros): Document AM_PROG_AS.
[automake.git] / tests / yacc2.test
blob8bbb1cc325ae3dc724503fb2b7b54b6c7d77c9bc
1 #! /bin/sh
3 # Test to make sure intermediate .h file is not generated nor removed
4 # if (AM_)?YFLAGS do not contain -d. Requested by Jim Meyering.
6 . $srcdir/defs || exit 1
8 cat >> configure.in << 'END'
9 AC_PROG_CC
10 AC_PROG_YACC
11 END
13 cat > Makefile.am <<'END'
14 bin_PROGRAMS = zardoz
15 zardoz_SOURCES = zardoz.y
16 END
18 # Don't redefine several times the same variable.
19 cp Makefile.am Makefile.src
24 $ACLOCAL || exit 1
25 $AUTOMAKE || exit 1
27 # If zardoz.h IS mentioned, fail
28 grep 'zardoz.h' Makefile.in > /dev/null && exit 1
32 cp Makefile.src Makefile.am
33 echo 'AM_YFLAGS = -d' >> Makefile.am
35 $AUTOMAKE || exit 1
37 # If zardoz.h is NOT mentioned, fail
38 grep 'zardoz.h' Makefile.in > /dev/null || exit 1
42 cp Makefile.src Makefile.am
43 echo 'AM_YFLAGS = ' >> Makefile.am
45 $AUTOMAKE || exit 1
47 # If zardoz.h IS mentioned, fail
48 grep 'zardoz.h' Makefile.in > /dev/null && exit 1
52 cp Makefile.src Makefile.am
53 echo 'YFLAGS = -d' >> Makefile.am
55 $AUTOMAKE || exit 1
57 # If zardoz.h is NOT mentioned, fail
58 grep 'zardoz.h' Makefile.in > /dev/null || exit 1
62 cp Makefile.src Makefile.am
63 echo 'YFLAGS = ' >> Makefile.am
65 $AUTOMAKE || exit 1
67 # If zardoz.h IS mentioned, fail
68 grep 'zardoz.h' Makefile.in > /dev/null && exit 1
70 exit 0