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.
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
@$(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 \
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; \
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.