From 505b61509f20d87c481d2963cb81cf24138f5c45 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 13 May 2004 20:09:07 +0000 Subject: [PATCH] Work even with FreeBSD "make", which uses sh -e and thus errors-out if a simple-command fails. --- ChangeLog | 8 ++++++++ Makefile.am | 2 +- lib/am/check.am | 8 ++++---- lib/am/ltlib.am | 2 +- lib/am/tags.am | 4 ++-- 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index c27fb32..dc3977b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-05-13 Paul Eggert + + * Makefile.am (fetch): Work even with FreeBSD "make", which + uses sh -e and thus errors-out if a simple-command fails. + * lib/am/check.am (check-TESTS): Likewise. + * lib/am/ltlib.am (clean-%DIR%LTLIBRARIES): Likewise. + * lib/am/tags.am (TAGS): Likewise. + 2004-05-13 Alexandre Duret-Lutz * tests/lex3.test, tests/yacc6.test: Require GNU Make. diff --git a/Makefile.am b/Makefile.am index 13fa036..c9a6cf5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -344,6 +344,6 @@ fetch: cp Fetchdir/$$file $(srcdir)/lib/$$file; \ fi; \ done; \ - test $$stat = 1 && \ + test $$stat = 0 || \ echo "See Fetchdir/update.patch for a log of the changes."; \ exit $$stat diff --git a/lib/am/check.am b/lib/am/check.am index 768bab7..6c624a9 100644 --- a/lib/am/check.am +++ b/lib/am/check.am @@ -80,20 +80,20 @@ check-TESTS: $(TESTS) skipped=""; \ if test "$$skip" -ne 0; then \ skipped="($$skip tests were not run)"; \ - test `echo "$$skipped" | wc -c` -gt `echo "$$banner" | wc -c` && \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -gt `echo "$$banner" | wc -c` && \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ echo "$$dashes"; \ echo "$$banner"; \ - test -n "$$skipped" && echo "$$skipped"; \ - test -n "$$report" && echo "$$report"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ echo "$$dashes"; \ test "$$failed" -eq 0; \ else :; fi diff --git a/lib/am/ltlib.am b/lib/am/ltlib.am index 0f6cc49..924a882 100644 --- a/lib/am/ltlib.am +++ b/lib/am/ltlib.am @@ -86,7 +86,7 @@ clean-%DIR%LTLIBRARIES: ## directory where the shared object is created. @list='$(%DIR%_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" = "$$p" && dir=.; \ + test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done diff --git a/lib/am/tags.am b/lib/am/tags.am index fabb8ad..7afbdd3 100644 --- a/lib/am/tags.am +++ b/lib/am/tags.am @@ -62,7 +62,7 @@ TAGS: %TAGSDIRS% $(HEADERS) $(SOURCES) %CONFIG% $(TAGS_DEPENDENCIES) \ ?SUBDIRS? list='$(SUBDIRS)'; for subdir in $$list; do \ ## Do nothing if we're trying to look in `.'. ?SUBDIRS? if test "$$subdir" = .; then :; else \ -?SUBDIRS? test -f $$subdir/TAGS && \ +?SUBDIRS? test ! -f $$subdir/TAGS || \ ## Note that the = is mandatory for --etags-include. ?SUBDIRS? tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ ?SUBDIRS? fi; \ @@ -77,7 +77,7 @@ TAGS: %TAGSDIRS% $(HEADERS) $(SOURCES) %CONFIG% $(TAGS_DEPENDENCIES) \ END { for (i in files) print i; }'`; \ ## Make sure we have something to run etags on. if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -z "$$unique" && unique=$$empty_fix; \ + test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi -- 2.7.4