summaryrefslogtreecommitdiff
path: root/lisp/Makefile.in
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2013-10-22 23:22:54 -0700
committerGlenn Morris <rgm@gnu.org>2013-10-22 23:22:54 -0700
commitb8e3b0a9ecb6c8ca1c2a4db189e92bcf08b5052d (patch)
tree0efdb7b6fafc13b3c0a4dca69bbd3a2a3ac9e2c4 /lisp/Makefile.in
parente4ea223d7332952cc0e1275fa4c982645e11b17f (diff)
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 'lisp/Makefile.in')
-rw-r--r--lisp/Makefile.in24
1 files changed, 13 insertions, 11 deletions
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
index 4fba1053dfa..814aefc0cc0 100644
--- a/lisp/Makefile.in
+++ b/lisp/Makefile.in
@@ -20,8 +20,10 @@
SHELL = @SHELL@
srcdir = @srcdir@
+abs_srcdir = @abs_srcdir@
top_srcdir = @top_srcdir@
abs_top_builddir = @abs_top_builddir@
+abs_lisp = $(abs_srcdir)
lisp = $(srcdir)
VPATH = $(srcdir)
@@ -112,7 +114,7 @@ COMPILE_FIRST = \
# The actual Emacs command run in the targets below.
-emacs = EMACSLOADPATH=$(lisp) LC_ALL=C $(EMACS) $(EMACSOPT)
+emacs = EMACSLOADPATH="$(abs_lisp)" LC_ALL=C "$(EMACS)" $(EMACSOPT)
# Common command to find subdirectories
setwins=subdirs=`find . -type d -print`; \
@@ -165,14 +167,14 @@ $(lisp)/cus-load.el:
custom-deps: doit
cd $(lisp); $(setwins_almost); \
echo Directories: $$wins; \
- $(emacs) -l cus-dep --eval '(setq generated-custom-dependencies-file (unmsys--file-name "$(lisp)/cus-load.el"))' -f custom-make-dependencies $$wins
+ $(emacs) -l cus-dep --eval '(setq generated-custom-dependencies-file (unmsys--file-name "$(abs_lisp)/cus-load.el"))' -f custom-make-dependencies $$wins
$(lisp)/finder-inf.el:
$(MAKE) $(MFLAGS) finder-data
finder-data: doit
cd $(lisp); $(setwins_almost); \
echo Directories: $$wins; \
- $(emacs) -l finder --eval '(setq generated-finder-keywords-file (unmsys--file-name "$(lisp)/finder-inf.el"))' -f finder-compile-keywords-make-dist $$wins
+ $(emacs) -l finder --eval '(setq generated-finder-keywords-file (unmsys--file-name "$(abs_lisp)/finder-inf.el"))' -f finder-compile-keywords-make-dist $$wins
# The chmod +w is to handle env var CVSREAD=1.
autoloads: $(LOADDEFS) doit
@@ -181,7 +183,7 @@ autoloads: $(LOADDEFS) doit
echo Directories: $$wins; \
$(emacs) -l autoload \
--eval '(setq autoload-builtin-package-versions t)' \
- --eval '(setq generated-autoload-file (unmsys--file-name "$(lisp)/loaddefs.el"))' \
+ --eval '(setq generated-autoload-file (unmsys--file-name "$(abs_lisp)/loaddefs.el"))' \
-f batch-update-autoloads $$wins
# This is required by the bootstrap-emacs target in ../src/Makefile, so
@@ -307,14 +309,14 @@ compile-clean:
# Explicitly pass EMACS (sometimes ../src/bootstrap-emacs) to those
# sub-makes that run rules that use it, for the sake of some non-GNU makes.
compile: $(LOADDEFS) autoloads compile-first
- $(MAKE) $(MFLAGS) compile-main EMACS=$(EMACS)
+ $(MAKE) $(MFLAGS) compile-main EMACS="$(EMACS)"
# Compile all Lisp files. This is like `compile' but compiles files
# unconditionally. Some files don't actually get compiled because they
# set the local variable no-byte-compile.
compile-always: doit
cd $(lisp); rm -f *.elc */*.elc */*/*.elc */*/*/*.elc
- $(MAKE) $(MFLAGS) compile EMACS=$(EMACS)
+ $(MAKE) $(MFLAGS) compile EMACS="$(EMACS)"
.PHONY: compile-calc backup-compiled-files compile-after-backup
@@ -378,7 +380,7 @@ mh-autoloads: $(MH_E_DIR)/mh-loaddefs.el
$(MH_E_DIR)/mh-loaddefs.el: $(MH_E_SRC)
$(emacs) -l autoload \
--eval "(setq generate-autoload-cookie \";;;###mh-autoload\")" \
- --eval "(setq generated-autoload-file (unmsys--file-name \"$@\"))" \
+ --eval "(setq generated-autoload-file (unmsys--file-name (expand-file-name \"$@\")))" \
--eval "(setq make-backup-files nil)" \
-f batch-update-autoloads $(MH_E_DIR)
@@ -396,7 +398,7 @@ TRAMP_SRC = $(TRAMP_DIR)/tramp.el $(TRAMP_DIR)/tramp-adb.el \
$(TRAMP_DIR)/tramp-loaddefs.el: $(TRAMP_SRC)
$(emacs) -l autoload \
--eval "(setq generate-autoload-cookie \";;;###tramp-autoload\")" \
- --eval "(setq generated-autoload-file (unmsys--file-name \"$@\"))" \
+ --eval "(setq generated-autoload-file (unmsys--file-name (expand-file-name \"$@\")))" \
--eval "(setq make-backup-files nil)" \
-f batch-update-autoloads $(TRAMP_DIR)
@@ -418,21 +420,21 @@ CAL_SRC = $(CAL_DIR)/cal-bahai.el $(CAL_DIR)/cal-china.el \
$(CAL_DIR)/cal-loaddefs.el: $(CAL_SRC)
$(emacs) -l autoload \
--eval "(setq generate-autoload-cookie \";;;###cal-autoload\")" \
- --eval "(setq generated-autoload-file (unmsys--file-name \"$@\"))" \
+ --eval "(setq generated-autoload-file (unmsys--file-name (expand-file-name \"$@\")))" \
--eval "(setq make-backup-files nil)" \
-f batch-update-autoloads $(CAL_DIR)
$(CAL_DIR)/diary-loaddefs.el: $(CAL_SRC)
$(emacs) -l autoload \
--eval "(setq generate-autoload-cookie \";;;###diary-autoload\")" \
- --eval "(setq generated-autoload-file (unmsys--file-name \"$@\"))" \
+ --eval "(setq generated-autoload-file (unmsys--file-name (expand-file-name \"$@\")))" \
--eval "(setq make-backup-files nil)" \
-f batch-update-autoloads $(CAL_DIR)
$(CAL_DIR)/hol-loaddefs.el: $(CAL_SRC)
$(emacs) -l autoload \
--eval "(setq generate-autoload-cookie \";;;###holiday-autoload\")" \
- --eval "(setq generated-autoload-file (unmsys--file-name \"$@\"))" \
+ --eval "(setq generated-autoload-file (unmsys--file-name (expand-file-name \"$@\")))" \
--eval "(setq make-backup-files nil)" \
-f batch-update-autoloads $(CAL_DIR)