From: Tom Tromey Date: Tue, 27 Feb 2001 08:07:57 +0000 (+0000) Subject: * distdir.am (distcheck): Fixed new code. X-Git-Tag: handle-languages~210 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=833912f601dd7be2df60393826207e556b7d46b8;p=thirdparty%2Fautomake.git * distdir.am (distcheck): Fixed new code. * tests/yaccvpath.test: Fail gracefully if bison/flex not found. Only configure once. --- diff --git a/ChangeLog b/ChangeLog index 69083f8ae..ae5710829 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2001-02-27 Tom Tromey + * 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. diff --git a/distdir.am b/distdir.am index 8f0037cdb..9d8d6a5f0 100644 --- a/distdir.am +++ b/distdir.am @@ -208,8 +208,9 @@ distdir: $(DISTFILES) ## 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' diff --git a/lib/am/distdir.am b/lib/am/distdir.am index 8f0037cdb..9d8d6a5f0 100644 --- a/lib/am/distdir.am +++ b/lib/am/distdir.am @@ -208,8 +208,9 @@ distdir: $(DISTFILES) ## 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' diff --git a/tests/yaccvpath.test b/tests/yaccvpath.test index ce4645b06..a952db74a 100755 --- a/tests/yaccvpath.test +++ b/tests/yaccvpath.test @@ -37,8 +37,15 @@ END # 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. @@ -50,10 +57,8 @@ $ACLOCAL $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 {};