aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGlenn Morris2013-10-22 23:22:54 -0700
committerGlenn Morris2013-10-22 23:22:54 -0700
commitb8e3b0a9ecb6c8ca1c2a4db189e92bcf08b5052d (patch)
tree0efdb7b6fafc13b3c0a4dca69bbd3a2a3ac9e2c4 /test
parente4ea223d7332952cc0e1275fa4c982645e11b17f (diff)
downloademacs-b8e3b0a9ecb6c8ca1c2a4db189e92bcf08b5052d.tar.gz
emacs-b8e3b0a9ecb6c8ca1c2a4db189e92bcf08b5052d.zip
Make building in directories with whitespace possible
Make has trouble with targets containing whitespace, http://savannah.gnu.org/bugs/?712, so the general approach is to use relative paths where possible. It's generally only Emacs itself that needs absolute paths, eg in src/epaths.h. * configure.ac (srcdir): Don't make it absolute - abs_srcdir exists. * Makefile.in (abs_srcdir): New, set by configure. (buildlisppath): Use abs_srcdir. (install-arch-indep, install-etcdoc, install-info, install-man) (install-etc): Quote entities that might contain whitespace. * admin/unidata/Makefile.in (emacs, ${DSTDIR}/charprop.el): Quote entities that might contain whitespace. * leim/Makefile.in (abs_srcdir): New, set by configure. (buildlisppath): Use abs_srcdir. (RUN_EMACS, .el.elc, changed.tit, changed.misc, leim-list.el) ($(srcdir)/ja-dic/ja-dic.el, setwins, distclean, check-declare): Quote entities that might contain whitespace. * lib-src/Makefile.in ($(DESTDIR)${archlibdir}): Quote entities that might contain whitespace. * lisp/Makefile.in (abs_srcdir, abs_lisp): New, set by configure. (emacs, compile, compile-always): Quote entities that might contain whitespace. (custom-deps, finder-data, autoloads): Use abs_lisp. ($(MH_E_DIR)/mh-loaddefs.el, $(TRAMP_DIR)/tramp-loaddefs.el) ($(CAL_DIR)/cal-loaddefs.el, $(CAL_DIR)/diary-loaddefs.el) ($(CAL_DIR)/hol-loaddefs.el): Manually expand target file name. * nextstep/Makefile.in (${ns_check_file} ${ns_appdir}): Quote entities that might contain whitespace. * nt/Makefile.in ($(DESTDIR)${archlibdir}): Quote entities that might contain whitespace. * src/Makefile.in (RUN_TEMACS): Make relative (again). ($(leimdir)/leim-list.el, .el.elc, $(lispsource)/loaddefs.el) (bootstrap-emacs$(EXEEXT)): Quote entities that might contain whitespace. * test/automated/Makefile.in (abs_top_srcdir, top_builddir): New, set by configure. (top_srcdir): Remove. (abs_test, abs_lispsrc): New. (lisp): No longer absolute. (emacs, lisp-compile, compile, compile-always): Quote entities that might contain whitespace. Fixes: debbugs:15675
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog10
-rw-r--r--test/automated/Makefile.in16
2 files changed, 19 insertions, 7 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 71104b64364..358ef31b1bb 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,13 @@
12013-10-23 Glenn Morris <rgm@gnu.org>
2
3 * automated/Makefile.in (abs_top_srcdir, top_builddir):
4 New, set by configure.
5 (top_srcdir): Remove.
6 (abs_test, abs_lispsrc): New.
7 (lisp): No longer absolute.
8 (emacs, lisp-compile, compile, compile-always):
9 Quote entities that might contain whitespace.
10
12013-10-22 Dmitry Gutov <dgutov@yandex.ru> 112013-10-22 Dmitry Gutov <dgutov@yandex.ru>
2 12
3 * indent/ruby.rb: Move two examples to "working" section, add one 13 * indent/ruby.rb: Move two examples to "working" section, add one
diff --git a/test/automated/Makefile.in b/test/automated/Makefile.in
index bf8e62f77cd..17e37556a3e 100644
--- a/test/automated/Makefile.in
+++ b/test/automated/Makefile.in
@@ -20,12 +20,14 @@
20SHELL = @SHELL@ 20SHELL = @SHELL@
21 21
22srcdir = @srcdir@ 22srcdir = @srcdir@
23top_srcdir = @top_srcdir@ 23abs_top_srcdir = @abs_top_srcdir@
24top_builddir = @top_builddir@
24abs_top_builddir = @abs_top_builddir@ 25abs_top_builddir = @abs_top_builddir@
25test = $(srcdir) 26test = $(srcdir)
27abs_test = $(abs_srcdir)
26VPATH = $(srcdir) 28VPATH = $(srcdir)
27lispsrc = $(top_srcdir)/lisp 29abs_lispsrc = $(abs_top_srcdir)/lisp
28lisp = ${abs_top_builddir}/lisp 30lisp = $(top_builddir)/lisp
29 31
30# You can specify a different executable on the make command line, 32# You can specify a different executable on the make command line,
31# e.g. "make EMACS=../src/emacs ...". 33# e.g. "make EMACS=../src/emacs ...".
@@ -46,7 +48,7 @@ BYTE_COMPILE_EXTRA_FLAGS =
46# The example above is just for developers, it should not be used by default. 48# The example above is just for developers, it should not be used by default.
47 49
48# The actual Emacs command run in the targets below. 50# The actual Emacs command run in the targets below.
49emacs = EMACSLOADPATH=$(lispsrc):$(test) LC_ALL=C $(EMACS) $(EMACSOPT) 51emacs = EMACSLOADPATH="$(abs_lispsrc):$(abs_test)" LC_ALL=C "$(EMACS)" $(EMACSOPT)
50 52
51# Common command to find subdirectories 53# Common command to find subdirectories
52setwins=subdirs=`find . -type d -print`; \ 54setwins=subdirs=`find . -type d -print`; \
@@ -79,7 +81,7 @@ doit:
79.PHONY: lisp-compile compile-main compile compile-always 81.PHONY: lisp-compile compile-main compile compile-always
80 82
81lisp-compile: 83lisp-compile:
82 cd $(lisp); $(MAKE) $(MFLAGS) compile EMACS=$(EMACS) 84 cd "$(lisp)"; $(MAKE) $(MFLAGS) compile EMACS="$(EMACS)"
83 85
84# In `compile-main' we could directly do 86# In `compile-main' we could directly do
85# ... | xargs $(MAKE) $(MFLAGS) EMACS="$(EMACS)" 87# ... | xargs $(MAKE) $(MFLAGS) EMACS="$(EMACS)"
@@ -128,14 +130,14 @@ compile-clean:
128# Explicitly pass EMACS (sometimes ../src/bootstrap-emacs) to those 130# Explicitly pass EMACS (sometimes ../src/bootstrap-emacs) to those
129# sub-makes that run rules that use it, for the sake of some non-GNU makes. 131# sub-makes that run rules that use it, for the sake of some non-GNU makes.
130compile: $(LOADDEFS) autoloads compile-first 132compile: $(LOADDEFS) autoloads compile-first
131 $(MAKE) $(MFLAGS) compile-main EMACS=$(EMACS) 133 $(MAKE) $(MFLAGS) compile-main EMACS="$(EMACS)"
132 134
133# Compile all Lisp files. This is like `compile' but compiles files 135# Compile all Lisp files. This is like `compile' but compiles files
134# unconditionally. Some files don't actually get compiled because they 136# unconditionally. Some files don't actually get compiled because they
135# set the local variable no-byte-compile. 137# set the local variable no-byte-compile.
136compile-always: doit 138compile-always: doit
137 cd $(test); rm -f *.elc */*.elc */*/*.elc */*/*/*.elc 139 cd $(test); rm -f *.elc */*.elc */*/*.elc */*/*/*.elc
138 $(MAKE) $(MFLAGS) compile EMACS=$(EMACS) 140 $(MAKE) $(MFLAGS) compile EMACS="$(EMACS)"
139 141
140bootstrap-clean: 142bootstrap-clean:
141 cd $(test); rm -f *.elc */*.elc */*/*.elc */*/*/*.elc 143 cd $(test); rm -f *.elc */*.elc */*/*.elc */*/*/*.elc