summaryrefslogtreecommitdiff
path: root/leim
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 /leim
parente4ea223d7332952cc0e1275fa4c982645e11b17f (diff)
downloademacs-b8e3b0a9ecb6c8ca1c2a4db189e92bcf08b5052d.tar.gz
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 'leim')
-rw-r--r--leim/ChangeLog8
-rw-r--r--leim/Makefile.in27
2 files changed, 22 insertions, 13 deletions
diff --git a/leim/ChangeLog b/leim/ChangeLog
index 11186603df8..4a629765386 100644
--- a/leim/ChangeLog
+++ b/leim/ChangeLog
@@ -1,3 +1,11 @@
+2013-10-23 Glenn Morris <rgm@gnu.org>
+
+ * 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.
+
2013-09-05 Jean Haidouk <haidouk@yandex.com> (tiny change)
* quail/latin-alt.el ("french-alt-postfix", "latin-alt-postfix"):
diff --git a/leim/Makefile.in b/leim/Makefile.in
index 7c3f3ca47e1..eb81e1b2add 100644
--- a/leim/Makefile.in
+++ b/leim/Makefile.in
@@ -25,16 +25,17 @@ SHELL = @SHELL@
# Here are the things that we expect ../configure to edit.
srcdir=@srcdir@
+abs_srcdir=@abs_srcdir@
# Which Emacs to use to convert TIT files to Emacs Lisp files,
# byte-compile Emacs Lisp files, and generate the file leim-list.el.
EMACS = ../src/emacs
-buildlisppath=${srcdir}/../lisp
+buildlisppath=${abs_srcdir}/../lisp
# How to run Emacs.
-RUN_EMACS = EMACSLOADPATH=$(buildlisppath) LC_ALL=C \
- ${EMACS} -batch --no-site-file --no-site-lisp
+RUN_EMACS = EMACSLOADPATH="$(buildlisppath)" LC_ALL=C \
+ "${EMACS}" -batch --no-site-file --no-site-lisp
MKDIR_P = @MKDIR_P@
@@ -76,7 +77,7 @@ TIT_MISC=${CHINESE_TIT} ${MISC}
.el.elc:
@echo Compiling $<
- @${RUN_EMACS} -l ${buildlisppath}/international/quail -f batch-byte-compile $<
+ @${RUN_EMACS} -l "${buildlisppath}/international/quail" -f batch-byte-compile $<
all: leim-list.el compile-main
.PHONY: all
@@ -109,7 +110,7 @@ ${CHINESE_TIT}: changed.tit
## It doesn't seem possible to do this with VPATH and suffix rules.
changed.tit: ${TIT_SOURCES}
@${MKDIR_P} quail
- ${RUN_EMACS} -l ${buildlisppath}/international/titdic-cnv \
+ ${RUN_EMACS} -l "${buildlisppath}/international/titdic-cnv" \
-f batch-titdic-convert -dir quail ${srcdir}/CXTERM-DIC; \
echo "changed" > $@
@@ -126,30 +127,30 @@ ${MISC}: changed.misc
changed.misc: ${MISC_SOURCES}
@${MKDIR_P} quail
- ${RUN_EMACS} -l ${buildlisppath}/international/titdic-cnv \
+ ${RUN_EMACS} -l "${buildlisppath}/international/titdic-cnv" \
-f batch-miscdic-convert -dir quail ${srcdir}/MISC-DIC; \
echo "changed" > $@
leim-list.el: ${TIT_MISC} ${srcdir}/leim-ext.el
rm -f leim-list.el
- if [ x`cd ${srcdir} && /bin/pwd` = x`/bin/pwd` ] ; then \
- ${RUN_EMACS} -l ${buildlisppath}/international/quail \
+ if [ "`cd ${srcdir} && /bin/pwd`" = "`/bin/pwd`" ] ; then \
+ ${RUN_EMACS} -l "${buildlisppath}/international/quail" \
--eval "(update-leim-list-file \".\")" ; \
else \
- ${RUN_EMACS} -l ${buildlisppath}/international/quail \
+ ${RUN_EMACS} -l "${buildlisppath}/international/quail" \
--eval "(update-leim-list-file \".\" (unmsys--file-name \"${srcdir}\"))" ; \
fi
sed -n '/^[^;]/ p' < ${srcdir}/leim-ext.el >> $@
$(srcdir)/ja-dic/ja-dic.el: $(srcdir)/SKK-DIC/SKK-JISYO.L
@$(MKDIR_P) $(srcdir)/ja-dic
- $(RUN_EMACS) -batch -l $(buildlisppath)/international/ja-dic-cnv \
+ $(RUN_EMACS) -batch -l "$(buildlisppath)/international/ja-dic-cnv" \
-f batch-skkdic-convert -dir "$(srcdir)/ja-dic" \
"$(srcdir)/SKK-DIC/SKK-JISYO.L"
## Following adapted from lisp/Makefile.in.
setwins=wins="${srcdir}/ja-dic quail"; \
- [ `cd ${srcdir} && /bin/pwd` != `/bin/pwd` ] && \
+ [ "`cd ${srcdir} && /bin/pwd`" != "`/bin/pwd`" ] && \
wins="$$wins ${srcdir}/quail"
.PHONY: compile-targets
@@ -184,7 +185,7 @@ bootstrap-clean: clean
$(setwins); for w in $$wins; do rm -f $$w/*.elc; done
distclean: clean
- -[ `cd ${srcdir} && /bin/pwd` != `/bin/pwd` ] && rm -rf quail
+ -[ "`cd ${srcdir} && /bin/pwd`" != "`/bin/pwd`" ] && rm -rf quail
rm -f Makefile
maintainer-clean: distclean bootstrap-clean
@@ -195,5 +196,5 @@ extraclean: maintainer-clean
.PHONY: check-declare
check-declare:
- $(RUN_EMACS) -l $(buildlisppath)/emacs-lisp/check-declare \
+ $(RUN_EMACS) -l "$(buildlisppath)/emacs-lisp/check-declare" \
--eval '(check-declare-directory (unmsys--file-name "$(srcdir)"))'