test/automated: Use relative filename for emacs executable
authorGlenn Morris <rgm@gnu.org>
Sat, 2 Nov 2013 20:54:08 +0000 (13:54 -0700)
committerGlenn Morris <rgm@gnu.org>
Sat, 2 Nov 2013 20:54:08 +0000 (13:54 -0700)
* Makefile.in (check): Depend on all.

* test/automated/Makefile.in (abs_top_builddir): Remove variable.
(EMACS): Use a relative file name.
(lisp-compile): Remove (assume it's up-to-date).
(compile-main): Do not run lisp-compile.
(check): Use --chdir.

ChangeLog
Makefile.in
test/ChangeLog
test/automated/Makefile.in

index 142cacb..eee806f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-11-02  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (check): Depend on all.
+
 2013-10-31  Glenn Morris  <rgm@gnu.org>
 
        * configure.ac: Use [!...] rather than [^...], for ksh.  (Bug#15769)
index 5cf2cb1..8915eb3 100644 (file)
@@ -936,7 +936,7 @@ extraclean:
 TAGS tags: lib lib-src src
        cd src; $(MAKE) $(MFLAGS) tags
 
-check:
+check: all
        @if test ! -d test/automated; then \
          echo "You do not seem to have the test/ directory."; \
          echo "Maybe you are using a release tarfile, rather than a repository checkout."; \
index 260a5bb..6d00a61 100644 (file)
@@ -1,12 +1,15 @@
 2013-11-02  Glenn Morris  <rgm@gnu.org>
 
        * automated/Makefile.in (top_builddir, abs_test, abs_lispsrc, lisp)
-       (test, abs_top_srcdir): Remove variables.
+       (test, abs_top_srcdir, abs_top_builddir): Remove variables.
        (abs_srcdir): New, set by configure.
+       (EMACS): Use a relative file name.
        (emacs): Use abs_srcdir rather than abs_lispsrc, abs_test.
-       (lisp-compile): Use ../../lisp rather than $lisp.
+       (lisp-compile): Remove (assume it's up-to-date).
+       (compile-main): Do not run lisp-compile.
        (compile-main, compile-clean, compile-always, bootstrap-clean)
        (check): Use srcdir rather than $test.  Check cd return value.
+       Use --chdir.
        (doit, compile, compile-always): Remove stuff copied from lisp/.
        (all, check, bootstrap-clean, distclean, maintainer-clean): PHONY.
 
index a84d8a7..7ddade8 100644 (file)
@@ -21,16 +21,12 @@ SHELL = @SHELL@
 
 srcdir = @srcdir@
 abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
 VPATH = $(srcdir)
 
-# You can specify a different executable on the make command line,
-# e.g. "make EMACS=../src/emacs ...".
-
-# We sometimes change directory before running Emacs (typically when
-# building out-of-tree, we chdir to the source directory), so we need
-# to use an absolute file name.
-EMACS = ${abs_top_builddir}/src/emacs
+# 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
@@ -62,17 +58,14 @@ all: check
        @$(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $<
 
 
-.PHONY: lisp-compile compile-targets compile-main compile-clean
-
-lisp-compile:
-       cd ../../lisp && $(MAKE) $(MFLAGS) compile EMACS="$(EMACS)"
+.PHONY: compile-targets compile-main compile-clean
 
 # TARGETS is set dynamically in the recursive call from `compile-main'.
 compile-targets: $(TARGETS)
 
 # Compile all the Elisp files that need it.  Beware: it approximates
 # `no-byte-compile', so watch out for false-positives!
-compile-main: compile-clean lisp-compile
+compile-main: compile-clean
        @(cd $(srcdir) && $(setwins); \
        els=`echo "$$wins " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.el |g'`; \
        for el in $$els; do \
@@ -108,7 +101,7 @@ maintainer-clean: distclean bootstrap-clean
 
 
 check: compile-main
-       @(cd $(srcdir) && $(setwins); \
+       @thisdir=`pwd`; cd $(srcdir) && $(setwins); \
        pattern=`echo "$$wins " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.el |g'`; \
        for el in $$pattern; do \
          test -f $$el || continue; \
@@ -116,6 +109,7 @@ check: compile-main
          els="$$els $$el"; \
        done; \
        echo Testing $$els; \
-       $(emacs) $$args -f ert-run-tests-batch-and-exit)
+       cd "$$thisdir"; \
+       $(emacs) --chdir $(srcdir) $$args -f ert-run-tests-batch-and-exit
 
 # Makefile ends here.