* tests/yaccvpath.test: Fail gracefully if bison/flex not found.
Only configure once.
2001-02-27 Tom Tromey <tromey@redhat.com>
+ * distdir.am (distcheck): Fixed new code.
+
+ * tests/yaccvpath.test: Fail gracefully if bison/flex not found.
+ Only configure once.
+
* distdir.am (distcheck): Print error message if distclean failed
to fully clean.
## Make sure to remove the dist file we created in the test build
## directory.
?TOPDIR? && rm -f $(distdir).tar.gz \
-?TOPDIR? && test `find . -type f -print | wc -l` -ne 0 \
-?TOPDIR? && (echo "Error: files left after distclean" 1>&2; exit 1)
+?TOPDIR? && (test `find . -type f -print | wc -l` -eq 0 \
+?TOPDIR? || (echo "Error: files left after distclean" 1>&2; \
+?TOPDIR? exit 1) )
?TOPDIR? -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
?TOPDIR? @echo "$(distdir).tar.gz is ready for distribution" | \
?TOPDIR? sed 'h;s/./=/g;p;x;p;x'
## Make sure to remove the dist file we created in the test build
## directory.
?TOPDIR? && rm -f $(distdir).tar.gz \
-?TOPDIR? && test `find . -type f -print | wc -l` -ne 0 \
-?TOPDIR? && (echo "Error: files left after distclean" 1>&2; exit 1)
+?TOPDIR? && (test `find . -type f -print | wc -l` -eq 0 \
+?TOPDIR? || (echo "Error: files left after distclean" 1>&2; \
+?TOPDIR? exit 1) )
?TOPDIR? -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
?TOPDIR? @echo "$(distdir).tar.gz is ready for distribution" | \
?TOPDIR? sed 'h;s/./=/g;p;x;p;x'
# Fail gracefully if no autoconf.
$needs_autoconf
-# Likewise for gcc.
+# Likewise for some other tools.
(gcc -v) > /dev/null 2>&1 || exit 77
+(flex -V) > /dev/null 2>&1 || exit 77
+(bison -V) > /dev/null 2>&1 || exit 77
+
+LEX=flex
+export LEX
+YACC=bison
+export YACC
# Remove some files installed by defs.
# They will be reinstalled by automake.
$AUTOCONF
$AUTOMAKE -a
-./configure
-$MAKE
-$MAKE distclean
-# this should left parse.c in the current directory
+bison -y parse.y
+mv y.tab.c parse.c
cat >> parse.y << 'END'
fubar : 'f' foobar {};