aboutsummaryrefslogtreecommitdiffstats
path: root/leim
diff options
context:
space:
mode:
authorGlenn Morris2013-10-22 23:22:54 -0700
committerGlenn Morris2013-10-22 23:22:54 -0700
commitb8e3b0a9ecb6c8ca1c2a4db189e92bcf08b5052d (patch)
tree0efdb7b6fafc13b3c0a4dca69bbd3a2a3ac9e2c4 /leim
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 '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 @@
12013-10-23 Glenn Morris <rgm@gnu.org>
2
3 * Makefile.in (abs_srcdir): New, set by configure.
4 (buildlisppath): Use abs_srcdir.
5 (RUN_EMACS, .el.elc, changed.tit, changed.misc, leim-list.el)
6 ($(srcdir)/ja-dic/ja-dic.el, setwins, distclean, check-declare):
7 Quote entities that might contain whitespace.
8
12013-09-05 Jean Haidouk <haidouk@yandex.com> (tiny change) 92013-09-05 Jean Haidouk <haidouk@yandex.com> (tiny change)
2 10
3 * quail/latin-alt.el ("french-alt-postfix", "latin-alt-postfix"): 11 * 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@
25 25
26# Here are the things that we expect ../configure to edit. 26# Here are the things that we expect ../configure to edit.
27srcdir=@srcdir@ 27srcdir=@srcdir@
28abs_srcdir=@abs_srcdir@
28 29
29# Which Emacs to use to convert TIT files to Emacs Lisp files, 30# Which Emacs to use to convert TIT files to Emacs Lisp files,
30# byte-compile Emacs Lisp files, and generate the file leim-list.el. 31# byte-compile Emacs Lisp files, and generate the file leim-list.el.
31EMACS = ../src/emacs 32EMACS = ../src/emacs
32 33
33buildlisppath=${srcdir}/../lisp 34buildlisppath=${abs_srcdir}/../lisp
34 35
35# How to run Emacs. 36# How to run Emacs.
36RUN_EMACS = EMACSLOADPATH=$(buildlisppath) LC_ALL=C \ 37RUN_EMACS = EMACSLOADPATH="$(buildlisppath)" LC_ALL=C \
37 ${EMACS} -batch --no-site-file --no-site-lisp 38 "${EMACS}" -batch --no-site-file --no-site-lisp
38 39
39MKDIR_P = @MKDIR_P@ 40MKDIR_P = @MKDIR_P@
40 41
@@ -76,7 +77,7 @@ TIT_MISC=${CHINESE_TIT} ${MISC}
76 77
77.el.elc: 78.el.elc:
78 @echo Compiling $< 79 @echo Compiling $<
79 @${RUN_EMACS} -l ${buildlisppath}/international/quail -f batch-byte-compile $< 80 @${RUN_EMACS} -l "${buildlisppath}/international/quail" -f batch-byte-compile $<
80 81
81all: leim-list.el compile-main 82all: leim-list.el compile-main
82.PHONY: all 83.PHONY: all
@@ -109,7 +110,7 @@ ${CHINESE_TIT}: changed.tit
109## It doesn't seem possible to do this with VPATH and suffix rules. 110## It doesn't seem possible to do this with VPATH and suffix rules.
110changed.tit: ${TIT_SOURCES} 111changed.tit: ${TIT_SOURCES}
111 @${MKDIR_P} quail 112 @${MKDIR_P} quail
112 ${RUN_EMACS} -l ${buildlisppath}/international/titdic-cnv \ 113 ${RUN_EMACS} -l "${buildlisppath}/international/titdic-cnv" \
113 -f batch-titdic-convert -dir quail ${srcdir}/CXTERM-DIC; \ 114 -f batch-titdic-convert -dir quail ${srcdir}/CXTERM-DIC; \
114 echo "changed" > $@ 115 echo "changed" > $@
115 116
@@ -126,30 +127,30 @@ ${MISC}: changed.misc
126 127
127changed.misc: ${MISC_SOURCES} 128changed.misc: ${MISC_SOURCES}
128 @${MKDIR_P} quail 129 @${MKDIR_P} quail
129 ${RUN_EMACS} -l ${buildlisppath}/international/titdic-cnv \ 130 ${RUN_EMACS} -l "${buildlisppath}/international/titdic-cnv" \
130 -f batch-miscdic-convert -dir quail ${srcdir}/MISC-DIC; \ 131 -f batch-miscdic-convert -dir quail ${srcdir}/MISC-DIC; \
131 echo "changed" > $@ 132 echo "changed" > $@
132 133
133leim-list.el: ${TIT_MISC} ${srcdir}/leim-ext.el 134leim-list.el: ${TIT_MISC} ${srcdir}/leim-ext.el
134 rm -f leim-list.el 135 rm -f leim-list.el
135 if [ x`cd ${srcdir} && /bin/pwd` = x`/bin/pwd` ] ; then \ 136 if [ "`cd ${srcdir} && /bin/pwd`" = "`/bin/pwd`" ] ; then \
136 ${RUN_EMACS} -l ${buildlisppath}/international/quail \ 137 ${RUN_EMACS} -l "${buildlisppath}/international/quail" \
137 --eval "(update-leim-list-file \".\")" ; \ 138 --eval "(update-leim-list-file \".\")" ; \
138 else \ 139 else \
139 ${RUN_EMACS} -l ${buildlisppath}/international/quail \ 140 ${RUN_EMACS} -l "${buildlisppath}/international/quail" \
140 --eval "(update-leim-list-file \".\" (unmsys--file-name \"${srcdir}\"))" ; \ 141 --eval "(update-leim-list-file \".\" (unmsys--file-name \"${srcdir}\"))" ; \
141 fi 142 fi
142 sed -n '/^[^;]/ p' < ${srcdir}/leim-ext.el >> $@ 143 sed -n '/^[^;]/ p' < ${srcdir}/leim-ext.el >> $@
143 144
144$(srcdir)/ja-dic/ja-dic.el: $(srcdir)/SKK-DIC/SKK-JISYO.L 145$(srcdir)/ja-dic/ja-dic.el: $(srcdir)/SKK-DIC/SKK-JISYO.L
145 @$(MKDIR_P) $(srcdir)/ja-dic 146 @$(MKDIR_P) $(srcdir)/ja-dic
146 $(RUN_EMACS) -batch -l $(buildlisppath)/international/ja-dic-cnv \ 147 $(RUN_EMACS) -batch -l "$(buildlisppath)/international/ja-dic-cnv" \
147 -f batch-skkdic-convert -dir "$(srcdir)/ja-dic" \ 148 -f batch-skkdic-convert -dir "$(srcdir)/ja-dic" \
148 "$(srcdir)/SKK-DIC/SKK-JISYO.L" 149 "$(srcdir)/SKK-DIC/SKK-JISYO.L"
149 150
150## Following adapted from lisp/Makefile.in. 151## Following adapted from lisp/Makefile.in.
151setwins=wins="${srcdir}/ja-dic quail"; \ 152setwins=wins="${srcdir}/ja-dic quail"; \
152 [ `cd ${srcdir} && /bin/pwd` != `/bin/pwd` ] && \ 153 [ "`cd ${srcdir} && /bin/pwd`" != "`/bin/pwd`" ] && \
153 wins="$$wins ${srcdir}/quail" 154 wins="$$wins ${srcdir}/quail"
154 155
155.PHONY: compile-targets 156.PHONY: compile-targets
@@ -184,7 +185,7 @@ bootstrap-clean: clean
184 $(setwins); for w in $$wins; do rm -f $$w/*.elc; done 185 $(setwins); for w in $$wins; do rm -f $$w/*.elc; done
185 186
186distclean: clean 187distclean: clean
187 -[ `cd ${srcdir} && /bin/pwd` != `/bin/pwd` ] && rm -rf quail 188 -[ "`cd ${srcdir} && /bin/pwd`" != "`/bin/pwd`" ] && rm -rf quail
188 rm -f Makefile 189 rm -f Makefile
189 190
190maintainer-clean: distclean bootstrap-clean 191maintainer-clean: distclean bootstrap-clean
@@ -195,5 +196,5 @@ extraclean: maintainer-clean
195.PHONY: check-declare 196.PHONY: check-declare
196 197
197check-declare: 198check-declare:
198 $(RUN_EMACS) -l $(buildlisppath)/emacs-lisp/check-declare \ 199 $(RUN_EMACS) -l "$(buildlisppath)/emacs-lisp/check-declare" \
199 --eval '(check-declare-directory (unmsys--file-name "$(srcdir)"))' 200 --eval '(check-declare-directory (unmsys--file-name "$(srcdir)"))'