* lib/am/depend.am (distclean-depend): Erase %DEPDIRS%, not $(DEPDIRS).
[platform/upstream/automake.git] / tests / yacc2.test
1 #! /bin/sh
2
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.
5
6 . $srcdir/defs || exit 1
7
8 cat >> configure.in << 'END'
9 AC_PROG_CC
10 AC_PROG_YACC
11 END
12
13 cat > Makefile.am <<'END'
14 bin_PROGRAMS = zardoz
15 zardoz_SOURCES = zardoz.y
16 END
17
18 # Don't redefine several times the same variable.
19 cp Makefile.am Makefile.src
20
21
22
23
24 $ACLOCAL || exit 1
25 $AUTOMAKE || exit 1
26
27 # If zardoz.h IS mentioned, fail
28 grep 'zardoz.h' Makefile.in > /dev/null && exit 1
29
30
31
32 cp Makefile.src Makefile.am
33 echo 'AM_YFLAGS = -d' >> Makefile.am
34
35 $AUTOMAKE || exit 1
36
37 # If zardoz.h is NOT mentioned, fail
38 grep 'zardoz.h' Makefile.in > /dev/null || exit 1
39
40
41
42 cp Makefile.src Makefile.am
43 echo 'AM_YFLAGS = ' >> Makefile.am
44
45 $AUTOMAKE || exit 1
46
47 # If zardoz.h IS mentioned, fail
48 grep 'zardoz.h' Makefile.in > /dev/null && exit 1
49
50
51
52 cp Makefile.src Makefile.am
53 echo 'YFLAGS = -d' >> Makefile.am
54
55 $AUTOMAKE || exit 1
56
57 # If zardoz.h is NOT mentioned, fail
58 grep 'zardoz.h' Makefile.in > /dev/null || exit 1
59
60
61
62 cp Makefile.src Makefile.am
63 echo 'YFLAGS = ' >> Makefile.am
64
65 $AUTOMAKE || exit 1
66
67 # If zardoz.h IS mentioned, fail
68 grep 'zardoz.h' Makefile.in > /dev/null && exit 1
69
70 exit 0