* yacc2.test, yacc3.test: New files.
[automake.git] / tests / yacc3.test
blobcbfe66b377f19fbf24cb2807145170c1749cd685
1 #! /bin/sh
3 # Ensure that generated .h file is distributed iff we have -d in
4 # (AM_)?YFLAGS.
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 magic:
17 @echo $(DIST_COMMON)
18 END
20 $AUTOMAKE || exit 1
22 # It should not be disted here
23 $MAKE -f Makefile.in SHELL=/bin/sh magic |
24 grep 'zardoz.h' Makefile.in > /dev/null && exit 1
26 echo 'YFLAGS = -d' >> Makefile.am
28 $AUTOMAKE || exit 1
30 # But it should here
31 $MAKE -f Makefile.in SHELL=/bin/sh magic |
32 grep 'zardoz.h' Makefile.in > /dev/null