Work even with FreeBSD "make", which uses sh -e and thus errors-out if
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 13 May 2004 20:09:07 +0000 (20:09 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 13 May 2004 20:09:07 +0000 (20:09 +0000)
a simple-command fails.

ChangeLog
Makefile.am
lib/am/check.am
lib/am/ltlib.am
lib/am/tags.am

index c27fb32..dc3977b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * 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  <adl@gnu.org>
 
        * tests/lex3.test, tests/yacc6.test: Require GNU Make.
index 13fa036..c9a6cf5 100644 (file)
@@ -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
index 768bab7..6c624a9 100644 (file)
@@ -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
index 0f6cc49..924a882 100644 (file)
@@ -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
index fabb8ad..7afbdd3 100644 (file)
@@ -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