]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* yacc2.test, yacc3.test: New files.
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Sat, 10 Apr 1999 00:48:06 +0000 (00:48 +0000)
committerAlexandre Oliva <oliva@dcc.unicamp.br>
Sat, 10 Apr 1999 00:48:06 +0000 (00:48 +0000)
* Makefile.am (TESTS): Added yacc2.test and yacc3.test.

tests/ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/yacc2.test [new file with mode: 0755]
tests/yacc3.test [new file with mode: 0755]

index 698fd08ed53038e2f13f1dca55e1c5ceefa06c95..8e2fa4e711dafef44a77cbd02c4bfc11666aa839 100644 (file)
@@ -1,3 +1,8 @@
+1999-04-10  Alexandre Oliva  <oliva@dcc.unicamp.br>
+
+       * yacc2.test, yacc3.test: New files.
+       * Makefile.am (TESTS): Added yacc2.test and yacc3.test.
+
 1999-04-09  Tom Tromey  <tromey@cygnus.com>
 
        * nodist.test: New file.
index 80d34e06000f2b6f87c70efc0c341065a7df31c9..851e74b9f49dbcd6a14943d425f440eb117cccde 100644 (file)
@@ -43,7 +43,7 @@ subst.test symlink.test syntax.test tags.test tagsub.test target.test \
 texinfo.test texinfo2.test texinfo3.test texinfo4.test texinfo5.test \
 texinfo6.test texinfo7.test texinfo8.test unused.test version.test \
 version2.test version3.test vpath.test vtexi.test vtexi2.test \
-whoami.test xsource.test yacc.test yaccpp.test
+whoami.test xsource.test yacc.test yacc2.test yacc3.test yaccpp.test
 
 EXTRA_DIST = defs $(TESTS)
 
index 2b8ed9d02ad7d188c883e54abfc8c7fca7b92094..f78e9200cf6194480cb9dc7388b52c2ed518420e 100644 (file)
@@ -108,16 +108,17 @@ subst.test symlink.test syntax.test tags.test tagsub.test target.test \
 texinfo.test texinfo2.test texinfo3.test texinfo4.test texinfo5.test \
 texinfo6.test texinfo7.test texinfo8.test unused.test version.test \
 version2.test version3.test vpath.test vtexi.test vtexi2.test \
-whoami.test xsource.test yacc.test yaccpp.test
+whoami.test xsource.test yacc.test yacc2.test yacc3.test yaccpp.test
 
 
 EXTRA_DIST = defs $(TESTS)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_CLEAN_FILES = 
+DIST_SOURCES = 
 DIST_COMMON =  ChangeLog Makefile.am Makefile.in
 
 
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
 GZIP_ENV = --best
 all: all-redirect
diff --git a/tests/yacc2.test b/tests/yacc2.test
new file mode 100755 (executable)
index 0000000..e6f319e
--- /dev/null
@@ -0,0 +1,51 @@
+#! /bin/sh
+
+# Test to make sure intermediate .h file is not generated nor removed
+# if (AM_)?YFLAGS do not contain -d.  Requested by Jim Meyering.
+
+. $srcdir/defs || exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_YACC
+END
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = zardoz
+zardoz_SOURCES = zardoz.y
+END
+
+$AUTOMAKE || exit 1
+
+# If zardoz.h IS mentioned, fail
+grep 'zardoz.h' Makefile.in > /dev/null && exit 1
+
+echo 'AM_YFLAGS = -d' >> Makefile.am
+
+$AUTOMAKE || exit 1
+
+# If zardoz.h is NOT mentioned, fail
+grep 'zardoz.h' Makefile.in > /dev/null || exit 1
+
+echo 'AM_YFLAGS = ' >> Makefile.am
+
+$AUTOMAKE || exit 1
+
+# If zardoz.h IS mentioned, fail
+grep 'zardoz.h' Makefile.in > /dev/null && exit 1
+
+echo 'YFLAGS = -d' >> Makefile.am
+
+$AUTOMAKE || exit 1
+
+# If zardoz.h is NOT mentioned, fail
+grep 'zardoz.h' Makefile.in > /dev/null || exit 1
+
+echo 'YFLAGS = ' >> Makefile.am
+
+$AUTOMAKE || exit 1
+
+# If zardoz.h IS mentioned, fail
+grep 'zardoz.h' Makefile.in > /dev/null && exit 1
+
+exit 0
diff --git a/tests/yacc3.test b/tests/yacc3.test
new file mode 100755 (executable)
index 0000000..cbfe66b
--- /dev/null
@@ -0,0 +1,32 @@
+#! /bin/sh
+
+# Ensure that generated .h file is distributed iff we have -d in
+# (AM_)?YFLAGS.
+
+. $srcdir/defs || exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_YACC
+END
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = zardoz
+zardoz_SOURCES = zardoz.y
+magic:
+       @echo $(DIST_COMMON)
+END
+
+$AUTOMAKE || exit 1
+
+# It should not be disted here
+$MAKE -f Makefile.in SHELL=/bin/sh magic |
+grep 'zardoz.h' Makefile.in > /dev/null && exit 1
+
+echo 'YFLAGS = -d' >> Makefile.am
+
+$AUTOMAKE || exit 1
+
+# But it should here
+$MAKE -f Makefile.in SHELL=/bin/sh magic |
+grep 'zardoz.h' Makefile.in > /dev/null