Commit b8e3b0a9 authored by Glenn Morris's avatar Glenn Morris

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
parent e4ea223d
2013-10-23 Glenn Morris <rgm@gnu.org>
Make building in directories with whitespace possible. (Bug#15675)
* 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.
2013-10-23 Paul Eggert <eggert@cs.ucla.edu>
Merge from gnulib, incorporating:
......
......@@ -163,6 +163,7 @@ bitmapdir=@bitmapdir@
# We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
srcdir=@srcdir@
abs_srcdir=@abs_srcdir@
# Where the manpage source files are kept.
mansrcdir=$(srcdir)/doc/man
......@@ -216,7 +217,7 @@ lisppath=@lisppath@
# before they've been installed in their final location.
# This should be a colon-separated list of directories.
# Normally it points to the lisp/ directory in the sources.
buildlisppath=${srcdir}/lisp
buildlisppath=${abs_srcdir}/lisp
# Where to install the other architecture-independent
# data files distributed with Emacs (like the tutorial,
......@@ -569,10 +570,10 @@ install-arch-indep: lisp leim install-info install-man ${INSTALL_ARCH_INDEP_EXTR
[ -d $${dir} ] || exit 1 ; \
dest=$$1 ; shift ; \
[ -d $${dest} ] && \
[ `cd $${dest} && /bin/pwd` = `cd $${dir} && /bin/pwd` ] && \
[ "`cd $${dest} && /bin/pwd`" = "`cd $${dir} && /bin/pwd`" ] && \
continue ; \
if [ "$${dir}" = "leim/quail" ]; then \
[ `cd $${dir} && /bin/pwd` = `cd ${srcdir}/leim/quail && /bin/pwd` ] && \
[ "`cd $${dir} && /bin/pwd`" = "`cd ${srcdir}/leim/quail && /bin/pwd`" ] && \
continue ; \
else \
rm -rf $${dest} ; \
......@@ -616,7 +617,7 @@ install-arch-indep: lisp leim install-info install-man ${INSTALL_ARCH_INDEP_EXTR
unset CDPATH; \
thisdir=`/bin/pwd`; \
for dir in $(DESTDIR)${lispdir} $(DESTDIR)${leimdir}; do \
cd $${thisdir} ; \
cd "$${thisdir}" ; \
cd $${dir} || exit 1 ; \
for f in `find . -name "*.elc" -print`; do \
${GZIP_PROG} -9n `echo $$f|sed 's/.elc$$/.el/'` ; \
......@@ -633,7 +634,7 @@ install-arch-indep: lisp leim install-info install-man ${INSTALL_ARCH_INDEP_EXTR
install-etcdoc: src install-arch-indep
-unset CDPATH; \
umask 022; ${MKDIR_P} $(DESTDIR)${etcdocdir} ; \
if [ `cd ./etc; /bin/pwd` != `cd $(DESTDIR)${etcdocdir}; /bin/pwd` ]; \
if [ "`cd ./etc; /bin/pwd`" != "`cd $(DESTDIR)${etcdocdir}; /bin/pwd`" ]; \
then \
docfile="DOC"; \
echo "Copying etc/$${docfile} to $(DESTDIR)${etcdocdir} ..." ; \
......@@ -646,27 +647,28 @@ install-info: info
umask 022; ${MKDIR_P} $(DESTDIR)${infodir}
-unset CDPATH; \
thisdir=`/bin/pwd`; \
[ `cd ${srcdir}/info && /bin/pwd` = `cd $(DESTDIR)${infodir} && /bin/pwd` ] || \
(cd $(DESTDIR)${infodir}; \
if [ "`cd ${srcdir}/info && /bin/pwd`" = "`cd $(DESTDIR)${infodir} && /bin/pwd`" ]; then \
true; \
else \
(cd "$(DESTDIR)${infodir}"; \
[ -f dir ] || \
(cd $${thisdir}; \
${INSTALL_DATA} ${srcdir}/info/dir $(DESTDIR)${infodir}/dir) ; \
info_misc=`cd $${thisdir}/doc/misc && \
$(QUIET_SUBMAKE) $(MAKE) -s echo-info \
`; \
(cd "$${thisdir}"; \
${INSTALL_DATA} ${srcdir}/info/dir $(DESTDIR)${infodir}/dir) ); \
info_misc=`cd doc/misc && $(QUIET_SUBMAKE) $(MAKE) -s echo-info`; \
cd ${srcdir}/info ; \
for elt in ${INFO_NONMISC} $${info_misc}; do \
test "$(HAVE_MAKEINFO)" = "no" && test ! -f $$elt && continue; \
for f in `ls $$elt $$elt-[1-9] $$elt-[1-9][0-9] 2>/dev/null`; do \
(cd $${thisdir}; \
(cd "$${thisdir}"; \
${INSTALL_DATA} ${srcdir}/info/$$f $(DESTDIR)${infodir}/$$f); \
[ -n "${GZIP_PROG}" ] || continue ; \
rm -f $(DESTDIR)${infodir}/$$f.gz; \
${GZIP_PROG} -9n $(DESTDIR)${infodir}/$$f; \
done; \
(cd $${thisdir}; \
(cd "$${thisdir}"; \
${INSTALL_INFO} --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$elt); \
done)
done; \
fi
## "gzip || true" is because some gzips exit with non-zero status
## if compression would not reduce the file size. Eg, the gzip in
......@@ -680,7 +682,7 @@ install-man:
cd ${mansrcdir}; \
for page in *.1; do \
dest=`echo "$${page}" | sed -e 's/\.1$$//' -e '$(TRANSFORM)'`.1; \
(cd $${thisdir}; \
(cd "$${thisdir}"; \
${INSTALL_DATA} ${mansrcdir}/$${page} $(DESTDIR)${man1dir}/$${dest}); \
[ -n "${GZIP_PROG}" ] || continue ; \
rm -f $(DESTDIR)${man1dir}/$${dest}.gz; \
......@@ -706,12 +708,12 @@ install-etc:
cd ${iconsrcdir} || exit 1; umask 022 ; \
for dir in */*/apps */*/mimetypes; do \
[ -d $${dir} ] || continue ; \
( cd $${thisdir}; ${MKDIR_P} $(DESTDIR)${icondir}/$${dir} ) ; \
( cd "$${thisdir}"; ${MKDIR_P} $(DESTDIR)${icondir}/$${dir} ) ; \
for icon in $${dir}/${EMACS_ICON}[.-]*; do \
[ -r $${icon} ] || continue ; \
ext=`echo "$${icon}" | sed -e 's|.*\.||'`; \
dest=`echo "$${icon}" | sed -e 's|.*/||' -e "s|\.$${ext}$$||" -e 's/$(EMACS_ICON)/emacs/' -e '$(TRANSFORM)'`.$${ext} ; \
( cd $${thisdir}; \
( cd "$${thisdir}"; \
${INSTALL_DATA} ${iconsrcdir}/$${icon} $(DESTDIR)${icondir}/$${dir}/$${dest} ) \
|| exit 1; \
done ; \
......@@ -734,8 +736,8 @@ uninstall: uninstall-$(NTDIR) uninstall-doc
-unset CDPATH; \
for dir in $(DESTDIR)${lispdir} $(DESTDIR)${etcdir} ; do \
if [ -d $${dir} ]; then \
case `cd $${dir} ; /bin/pwd` in \
`cd ${srcdir} ; /bin/pwd`* ) ;; \
case "`cd $${dir} ; /bin/pwd`" in \
"`cd ${srcdir} ; /bin/pwd`"* ) ;; \
* ) rm -rf $${dir} ;; \
esac ; \
case $${dir} in \
......@@ -750,7 +752,7 @@ uninstall: uninstall-$(NTDIR) uninstall-doc
(info_misc=`cd doc/misc && $(QUIET_SUBMAKE) $(MAKE) -s echo-info`; \
if cd $(DESTDIR)${infodir}; then \
for elt in ${INFO_NONMISC} $${info_misc}; do \
(cd $${thisdir}; \
(cd "$${thisdir}"; \
$(INSTALL_INFO) --remove --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$elt); \
if [ -n "${GZIP_PROG}" ]; then \
ext=.gz; else ext=; fi; \
......
2013-10-23 Glenn Morris <rgm@gnu.org>
* unidata/Makefile.in (emacs, ${DSTDIR}/charprop.el):
Quote entities that might contain whitespace.
2013-10-07 Paul Eggert <eggert@cs.ucla.edu>
Improve support for popcount and counting trailing zeros (Bug#15550).
......
......@@ -30,7 +30,7 @@ abs_top_builddir = @abs_top_builddir@
EMACS = ${abs_top_builddir}/src/emacs
DSTDIR = ${top_srcdir}/lisp/international
emacs = ${EMACS} -batch --no-site-file --no-site-lisp
emacs = "${EMACS}" -batch --no-site-file --no-site-lisp
all: ${DSTDIR}/charprop.el
......@@ -42,7 +42,7 @@ unidata.txt: ${srcdir}/UnicodeData.txt
${DSTDIR}/charprop.el: ${srcdir}/unidata-gen.elc unidata.txt
cd ${DSTDIR} && ${emacs} -l ${srcdir}/unidata-gen \
-f unidata-gen-files ${srcdir} ${abs_builddir}/unidata.txt
-f unidata-gen-files ${srcdir} "${abs_builddir}/unidata.txt"
## Like the above, but generate in PWD rather than lisp/international.
charprop.el: ${srcdir}/unidata-gen.elc unidata.txt
......
......@@ -419,30 +419,6 @@ AC_ARG_ENABLE(gtk-deprecation-warnings,
[Show Gtk+/Gdk deprecation warnings for Gtk+ >= 3.0])],
[ac_enable_gtk_deprecation_warnings="${enableval}"],[])
#### Make srcdir absolute, if it isn't already. It's important to
#### avoid running the file name through pwd unnecessarily, since pwd can
#### give you automounter prefixes, which can go away. We do all this
#### so Emacs can find its files when run uninstalled.
## Make sure CDPATH doesn't affect cd (in case PWD is relative).
unset CDPATH
case "${srcdir}" in
[[\\/]]* | ?:[[\\/]]*) ;;
. )
## We may be able to use the $PWD environment variable to make this
## absolute. But sometimes PWD is inaccurate.
## Note: we used to use $PWD at the end instead of `pwd`,
## but that tested only for a well-formed and valid PWD,
## it did not object when PWD was well-formed and valid but just wrong.
if test ".$PWD" != "." && test ".`(cd "$PWD" ; sh -c pwd)`" = ".`pwd`" ;
then
srcdir="$PWD"
else
srcdir=`(cd "$srcdir"; pwd)`
fi
;;
* ) srcdir=`(cd "$srcdir"; pwd)` ;;
esac
#### When building with MinGW inside the MSYS tree, 'pwd' produces
#### directories relative to the root of the MSYS tree,
#### e.g. '/home/user/foo' instead of '/d/MSYS/home/user/foo'. When
......@@ -452,7 +428,7 @@ esac
#### substitution, it cannot find the data directory. "pwd -W"
#### produces Windows-style 'd:/foo/bar' absolute directory names, so
#### we use it here to countermand that lossage.
test "$MSYSTEM" = "MINGW32" && srcdir=`(cd "$srcdir"; pwd -W | sed -e 's,^\([[A-Za-z]]\):,/\1,')`
test "$MSYSTEM" = "MINGW32" && abs_srcdir=`(cd "$abs_srcdir"; pwd -W | sed -e 's,^\([[A-Za-z]]\):,/\1,')`
### Canonicalize the configuration name.
......
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"):
......
......@@ -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)"))'
2013-10-23 Glenn Morris <rgm@gnu.org>
* Makefile.in ($(DESTDIR)${archlibdir}):
Quote entities that might contain whitespace.
2013-10-10 Glenn Morris <rgm@gnu.org>
* make-docfile.c (search_lisp_doc_at_eol):
......
......@@ -232,7 +232,7 @@ $(DESTDIR)${archlibdir}: all
@echo
@echo "Installing utilities run internally by Emacs."
umask 022; ${MKDIR_P} $(DESTDIR)${archlibdir}
if [ `cd $(DESTDIR)${archlibdir} && /bin/pwd` != `/bin/pwd` ]; then \
if [ "`cd $(DESTDIR)${archlibdir} && /bin/pwd`" != "`/bin/pwd`" ]; then \
for file in ${UTILITIES}; do \
$(INSTALL_PROGRAM) $(INSTALL_STRIP) $$file $(DESTDIR)${archlibdir}/$$file ; \
done ; \
......@@ -244,8 +244,8 @@ $(DESTDIR)${archlibdir}: all
chown ${gameuser} $(DESTDIR)${gamedir}; \
chmod u=rwx,g=rwx,o=rx $(DESTDIR)${gamedir}; \
fi
if [ `cd $(DESTDIR)${archlibdir} && /bin/pwd` \
!= `cd ${srcdir} && /bin/pwd` ]; then \
if [ "`cd $(DESTDIR)${archlibdir} && /bin/pwd`" \
!= "`cd ${srcdir} && /bin/pwd`" ]; then \
for file in ${SCRIPTS}; do \
$(INSTALL_SCRIPT) ${srcdir}/$$file $(DESTDIR)${archlibdir}/$$file; \
done ; \
......
2013-10-23 Glenn Morris <rgm@gnu.org>
* 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.
2013-10-23 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/ruby-mode.el (ruby-smie--at-dot-call): Use
......
......@@ -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)
......
2013-10-23 Glenn Morris <rgm@gnu.org>
* Makefile.in (${ns_check_file} ${ns_appdir}):
Quote entities that might contain whitespace.
2013-09-02 Jan Djärv <jan.h.d@swipnet.se>
* Makefile.in (${ns_check_file}): Add so Emacs.app gets properly
......
......@@ -38,7 +38,7 @@ ${ns_check_file} ${ns_appdir}: ${srcdir}/${ns_appsrc} ${ns_appsrc}
${MKDIR_P} ${ns_appdir}
( cd ${srcdir}/${ns_appsrc} ; tar cfh - . ) | \
( cd ${ns_appdir} ; umask 022; tar xf - )
[ `cd ${srcdir} && /bin/pwd` = `/bin/pwd` ] || \
[ "`cd ${srcdir} && /bin/pwd`" = "`/bin/pwd`" ] || \
( cd ${ns_appsrc} ; tar cfh - . ) | \
( cd ${ns_appdir} ; umask 022; tar xf - )
touch ${ns_appdir}
......
2013-10-23 Glenn Morris <rgm@gnu.org>
* Makefile.in ($(DESTDIR)${archlibdir}):
Quote entities that might contain whitespace.
2013-10-14 Eli Zaretskii <eliz@gnu.org>
* inc/mingw_time.h: New file.
......
......@@ -142,7 +142,7 @@ $(DESTDIR)${archlibdir}: all
@echo
@echo "Installing utilities run internally by Emacs."
umask 022; ${MKDIR_P} $(DESTDIR)${archlibdir}
if [ `cd $(DESTDIR)${archlibdir} && /bin/pwd` != `/bin/pwd` ]; then \
if [ "`cd $(DESTDIR)${archlibdir} && /bin/pwd`" != "`/bin/pwd`" ]; then \
for file in ${UTILITIES}; do \
$(INSTALL_PROGRAM) $(INSTALL_STRIP) $$file $(DESTDIR)${archlibdir}/$$file ; \
done ; \
......
2013-10-23 Glenn Morris <rgm@gnu.org>
* 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.
2013-10-23 Paul Eggert <eggert@cs.ucla.edu>
Port to Solaris 10 and its bundled GCC.
......
......@@ -313,7 +313,7 @@ INTERVALS_H = dispextern.h intervals.h composite.h
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
RUN_TEMACS = `/bin/pwd`/temacs
RUN_TEMACS = ./temacs
## Invoke ../nt/addsection for MinGW, ":" elsewhere.
TEMACS_POST_LINK = @TEMACS_POST_LINK@
......@@ -437,7 +437,7 @@ all: emacs$(EXEEXT) $(OTHER_FILES)
.PHONY: all
$(leimdir)/leim-list.el: bootstrap-emacs$(EXEEXT)
cd $(leimdir) && $(MAKE) $(MFLAGS) leim-list.el EMACS=$(bootstrap_exe)
cd $(leimdir) && $(MAKE) $(MFLAGS) leim-list.el EMACS="$(bootstrap_exe)"
## The dumped Emacs is as functional and more efficient than
## bootstrap-emacs, so we replace the latter with the former.
......@@ -646,7 +646,7 @@ tags: TAGS TAGS-LISP $(lwlibdir)/TAGS
## With GNU Make, we would just say "%.el : %.elc $(BOOTSTRAPEMACS)"
.el.elc:
@cd ../lisp; $(MAKE) $(MFLAGS) compile-onefile \
THEFILE=$< EMACS=$(bootstrap_exe)
THEFILE=$< EMACS="$(bootstrap_exe)"
## Since the .el.elc rule cannot specify an extra dependency, we do it here.
$(lisp): $(BOOTSTRAPEMACS)
......@@ -657,7 +657,7 @@ $(lisp): $(BOOTSTRAPEMACS)
VCSWITNESS =
$(lispsource)/loaddefs.el: $(BOOTSTRAPEMACS) $(VCSWITNESS)
cd ../lisp; $(MAKE) $(MFLAGS) autoloads EMACS=$(bootstrap_exe)
cd ../lisp; $(MAKE) $(MFLAGS) autoloads EMACS="$(bootstrap_exe)"
## Dump an Emacs executable named bootstrap-emacs containing the
## files from loadup.el in source form.
......@@ -672,7 +672,7 @@ bootstrap-emacs$(EXEEXT): temacs$(EXEEXT)
mv -f emacs$(EXEEXT) bootstrap-emacs$(EXEEXT); \
fi
@: Compile some files earlier to speed up further compilation.
cd ../lisp; $(MAKE) $(MFLAGS) compile-first EMACS=$(bootstrap_exe)
cd ../lisp; $(MAKE) $(MFLAGS) compile-first EMACS="$(bootstrap_exe)"
## Insert either autodeps.mk (if AUTO_DEPEND), else deps.mk.
@deps_frag@
......
2013-10-23 Glenn Morris <rgm@gnu.org>
* 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.
2013-10-22 Dmitry Gutov <dgutov@yandex.ru>
* indent/ruby.rb: Move two examples to "working" section, add one
......
......@@ -20,12 +20,14 @@
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
abs_top_srcdir = @abs_top_srcdir@
top_builddir = @top_builddir@
abs_top_builddir = @abs_top_builddir@
test = $(srcdir)
abs_test = $(abs_srcdir)
VPATH = $(srcdir)
lispsrc = $(top_srcdir)/lisp
lisp = ${abs_top_builddir}/lisp
abs_lispsrc = $(abs_top_srcdir)/lisp
lisp = $(top_builddir)/lisp
# You can specify a different executable on the make command line,
# e.g. "make EMACS=../src/emacs ...".
......@@ -46,7 +48,7 @@ BYTE_COMPILE_EXTRA_FLAGS =
# The example above is just for developers, it should not be used by default.
# The actual Emacs command run in the targets below.
emacs = EMACSLOADPATH=$(lispsrc):$(test) LC_ALL=C $(EMACS) $(EMACSOPT)
emacs = EMACSLOADPATH="$(abs_lispsrc):$(abs_test)" LC_ALL=C "$(EMACS)" $(EMACSOPT)
# Common command to find subdirectories
setwins=subdirs=`find . -type d -print`; \
......@@ -79,7 +81,7 @@ doit:
.PHONY: lisp-compile compile-main compile compile-always
lisp-compile:
cd $(lisp); $(MAKE) $(MFLAGS) compile EMACS=$(EMACS)
cd "$(lisp)"; $(MAKE) $(MFLAGS) compile EMACS="$(EMACS)"
# In `compile-main' we could directly do
# ... | xargs $(MAKE) $(MFLAGS) EMACS="$(EMACS)"
......@@ -128,14 +130,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 $(test); rm -f *.elc */*.elc */*/*.elc */*/*/*.elc
$(MAKE) $(MFLAGS) compile EMACS=$(EMACS)
$(MAKE) $(MFLAGS) compile EMACS="$(EMACS)"
bootstrap-clean:
cd $(test); rm -f *.elc */*.elc */*/*.elc */*/*/*.elc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment