summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2013-11-02 13:54:08 -0700
committerGlenn Morris <rgm@gnu.org>2013-11-02 13:54:08 -0700
commit67fb4e6a86456acb7fd6564bc0f70d8bf6d7704d (patch)
treecefcfeecd84afb87ba0a26683f7b2514fe02271c
parent67bb589ef9106a0031deb0292008d3592fff4240 (diff)
downloademacs-67fb4e6a86456acb7fd6564bc0f70d8bf6d7704d.tar.gz
test/automated: Use relative filename for emacs executable
* 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.
-rw-r--r--ChangeLog4
-rw-r--r--Makefile.in2
-rw-r--r--test/ChangeLog7
-rw-r--r--test/automated/Makefile.in24
4 files changed, 19 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index 142cacbc9f9..eee806f6b68 100644
--- 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)
diff --git a/Makefile.in b/Makefile.in
index 5cf2cb1200f..8915eb3d9f9 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -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."; \
diff --git a/test/ChangeLog b/test/ChangeLog
index 260a5bb72ff..6d00a61aeed 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -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.
diff --git a/test/automated/Makefile.in b/test/automated/Makefile.in
index a84d8a7b349..7ddade8dadc 100644
--- a/test/automated/Makefile.in
+++ b/test/automated/Makefile.in
@@ -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.