]> code.delx.au - gnu-emacs/blobdiff - test/automated/Makefile.in
* test/automated/Makefile.in: Tweak previous change
[gnu-emacs] / test / automated / Makefile.in
index 63cffd9f828faa2486ea59934ebfe30005740f86..a8adaf4048392b4313f6200cc4e00391f47ce99e 100644 (file)
@@ -22,13 +22,21 @@ SHELL = @SHELL@
 srcdir = @srcdir@
 VPATH = $(srcdir)
 
+PATH_SEPARATOR = @PATH_SEPARATOR@
+
+# Empty for all systems except MinGW, where xargs needs an explicit
+# limitation.
+XARGS_LIMIT = @XARGS_LIMIT@
+
 # We never change directory before running Emacs, so a relative file
 # name is fine, and makes life easier.  If we need to change
 # directory, we can use emacs --chdir.
 EMACS = ../../src/emacs
 
 # Command line flags for Emacs.
-EMACSOPT = -batch --no-site-file --no-site-lisp -L :$(srcdir)
+# Apparently MSYS bash would convert "-L :" to "-L ;" anyway,
+# but we might as well be explicit.
+EMACSOPT = -batch --no-site-file --no-site-lisp -L "$(PATH_SEPARATOR)$(srcdir)"
 
 # Extra flags to pass to the byte compiler.
 BYTE_COMPILE_EXTRA_FLAGS =
@@ -39,9 +47,8 @@ emacs = unset EMACSLOADPATH; \
        LC_ALL=C EMACS_TEST_DIRECTORY=$(srcdir) "$(EMACS)" $(EMACSOPT)
 
 # Common command to find subdirectories
-setwins=subdirs=`find $(srcdir) -type d -print`; \
-       for file in $$subdirs; do \
-          case $$file in */data* | */flymake* ) ;; \
+setwins=for file in `find $(srcdir) -type d -print`; do \
+          case $$file in $(srcdir)*/data* | $(srcdir)*/flymake* ) ;; \
                *) wins="$$wins$${wins:+ }$$file" ;; \
           esac; \
         done
@@ -73,7 +80,7 @@ compile-main: compile-clean
          test -f $$el || continue; \
          test ! -f $${el}c && GREP_OPTIONS= grep '^;.*no-byte-compile: t' $$el > /dev/null && continue; \
          echo "$${el}c"; \
-       done | xargs echo | \
+       done | xargs $(XARGS_LIMIT) echo | \
        while read chunk; do \
          $(MAKE) $(MFLAGS) compile-targets EMACS="$(EMACS)" TARGETS="$$chunk"; \
        done