From 18ba6a334d9fabe753f657008fe0084798b77673 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 2 Nov 2013 13:05:15 -0700 Subject: [PATCH] * lisp/Makefile.in (EMACS): Use a relative filename. (custom-deps, finder-data, autoloads): Use --chdir. --- lisp/ChangeLog | 3 +++ lisp/Makefile.in | 21 +++++++++++---------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1c175aa8830..b8918725c10 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2013-11-02 Glenn Morris + * Makefile.in (EMACS): Use a relative filename. + (custom-deps, finder-data, autoloads): Use --chdir. + * Makefile.in (abs_lisp): Remove, replace by abs_srcdir. Use relative filenames in TAGS files. diff --git a/lisp/Makefile.in b/lisp/Makefile.in index b1fd6b93ff5..1ac6338bcd1 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -33,10 +33,10 @@ XARGS_LIMIT = @XARGS_LIMIT@ # You can specify a different executable on the make command line, # e.g. "make EMACS=../src/emacs ...". -# We sometimes change directory before running Emacs (typically when -# building out-of-tree, we chdir to the source directory), so we need -# to use an absolute file name. -EMACS = ${abs_top_builddir}/src/emacs +# We never change directory before running Emacs, so a relative file +# name is fine, and makes life easier. If we need to change +# directory, we can use emacs --chdir. +EMACS = ../src/emacs # Command line flags for Emacs. @@ -159,25 +159,26 @@ doit: $(lisp)/cus-load.el: $(MAKE) $(MFLAGS) custom-deps custom-deps: doit - cd $(lisp) && $(setwins_almost); \ + thisdir=`pwd`; cd $(lisp) && $(setwins_almost); cd "$$thisdir"; \ echo Directories: $$wins; \ - $(emacs) -l cus-dep -f custom-make-dependencies $$wins + $(emacs) --chdir $(lisp) -l cus-dep -f custom-make-dependencies $$wins $(lisp)/finder-inf.el: $(MAKE) $(MFLAGS) finder-data finder-data: doit - cd $(lisp) && $(setwins_almost); \ + thisdir=`pwd`; cd $(lisp) && $(setwins_almost); cd "$$thisdir"; \ echo Directories: $$wins; \ - $(emacs) -l finder -f finder-compile-keywords-make-dist $$wins + $(emacs) --chdir $(lisp) -l finder \ + -f finder-compile-keywords-make-dist $$wins # The chmod +w is to handle env var CVSREAD=1. # Use expand-file-name rather than $abs_scrdir so that Emacs does not # get confused when it compares file-names for equality. autoloads: $(LOADDEFS) doit cd $(lisp) && chmod +w $(AUTOGEN_VCS) - cd $(lisp) && $(setwins_almost); \ + thisdir=`pwd`; cd $(lisp) && $(setwins_almost); cd "$$thisdir"; \ echo Directories: $$wins; \ - $(emacs) -l autoload \ + $(emacs) --chdir $(lisp) -l autoload \ --eval '(setq autoload-builtin-package-versions t)' \ --eval '(setq generated-autoload-file (expand-file-name "loaddefs.el"))' \ -f batch-update-autoloads $$wins -- 2.39.2