emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r99712: Use absolute directory names


From: Andreas Schwab
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r99712: Use absolute directory names substituted by configure
Date: Sun, 21 Mar 2010 12:57:49 +0100
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 99712
committer: Andreas Schwab <address@hidden>
branch nick: emacs
timestamp: Sun 2010-03-21 12:57:49 +0100
message:
  Use absolute directory names substituted by configure
  
  * lisp/Makefile.in (top_srcdir): Define.
  (abs_top_builddir): Define.
  (srcdir): Don't append `/..'.
  (EMACS): Use ${abs_top_builddir}.
  (all, compile, compile-always, compile-last): Don't set emacswd.
  (update-subdirs, update-authors): Use $(top_srcdir) instead of
  $(srcdir).
  (lisp): Use $(srcdir) instead of @address@hidden
  * src/Makefile.in (abs_builddir): Define.
  (bootstrap_exe): Use it.
  (VPATH): Use $(srcdir) instead of @address@hidden
modified:
  lisp/ChangeLog
  lisp/Makefile.in
  src/ChangeLog
  src/Makefile.in
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-03-21 10:52:51 +0000
+++ b/lisp/ChangeLog    2010-03-21 11:57:49 +0000
@@ -1,3 +1,14 @@
+2010-03-21  Andreas Schwab  <address@hidden>
+
+       * Makefile.in (top_srcdir): Define.
+       (abs_top_builddir): Define.
+       (srcdir): Don't append `/..'.
+       (EMACS): Use ${abs_top_builddir}.
+       (all, compile, compile-always, compile-last): Don't set emacswd.
+       (update-subdirs, update-authors): Use $(top_srcdir) instead of
+       $(srcdir).
+       (lisp): Use $(srcdir) instead of @address@hidden
+
 2010-03-21  Juri Linkov  <address@hidden>
 
        Fix message of multi-line occur regexps and multi-buffer header lines.

=== modified file 'lisp/Makefile.in'
--- a/lisp/Makefile.in  2010-03-20 21:46:31 +0000
+++ b/lisp/Makefile.in  2010-03-21 11:57:49 +0000
@@ -19,22 +19,19 @@
 
 SHELL = /bin/sh
 
address@hidden@
address@hidden@
address@hidden@/..
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+abs_top_builddir = @abs_top_builddir@
+lisp = $(srcdir)
+VPATH = $(srcdir)
 
 # 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 aboluste file name.  But there's no standard way
-# in a makefile to get the pwd, so we simply rely on a shell
-# "$emacswd" var that needs to be set wherever we use $(EMACS) (or
-# $(emacs)).  Yet, it is setup in such a way that if you forget to set
-# $emacswd, it will still work, so long as you did not
-# change directory.
-EMACS = $$emacswd../src/emacs
+# to use an aboluste file name.
+EMACS = ${abs_top_builddir}/src/emacs
 
 # Command line flags for Emacs.  This must include --multibyte,
 # otherwise some files will not compile.
@@ -119,7 +116,7 @@
 # we add them here to make sure they get built.
 all: compile-main $(lisp)/cus-load.el $(lisp)/finder-inf.el
        @: Let us check that we byte-compiled all the files.
-       emacswd=`pwd`/; $(MAKE) $(MFLAGS) compile-last EMACS=$(EMACS)
+       $(MAKE) $(MFLAGS) compile-last EMACS=$(EMACS)
 
 doit:
 
@@ -140,14 +137,14 @@
 $(lisp)/cus-load.el:
        $(MAKE) $(MFLAGS) custom-deps
 custom-deps: doit
-       emacswd=`pwd`/; cd $(lisp); $(setwins_almost); \
+       cd $(lisp); $(setwins_almost); \
        echo Directories: $$wins; \
        $(emacs) -l cus-dep --eval '(setq generated-custom-dependencies-file 
"$(lisp)/cus-load.el")' -f custom-make-dependencies $$wins
 
 $(lisp)/finder-inf.el:
        $(MAKE) $(MFLAGS) finder-data
 finder-data: doit
-       emacswd=`pwd`/; cd $(lisp); $(setwins_almost); \
+       cd $(lisp); $(setwins_almost); \
        echo Directories: $$wins; \
        $(emacs) -l finder --eval '(setq generated-finder-keywords-file 
"$(lisp)/finder-inf.el")' -f finder-compile-keywords-make-dist $$wins
 
@@ -157,7 +154,7 @@
        chmod +w $(lisp)/ps-print.el $(lisp)/emulation/tpu-edt.el \
          $(lisp)/emacs-lisp/cl-loaddefs.el $(lisp)/mail/rmail.el \
          $(lisp)/dired.el $(lisp)/ibuffer.el
-       emacswd=`pwd`/; cd $(lisp); $(setwins_almost); \
+       cd $(lisp); $(setwins_almost); \
        echo Directories: $$wins; \
        $(emacs) -l autoload --eval '(setq generated-autoload-file 
"$(lisp)/loaddefs.el")' -f batch-update-autoloads $$wins
 
@@ -168,7 +165,7 @@
 update-subdirs: doit
        cd $(lisp); $(setwins_for_subdirs); \
        for file in $$wins; do \
-          $(srcdir)/update-subdirs $$file; \
+          $(top_srcdir)/update-subdirs $$file; \
        done;
 
 updates: update-subdirs autoloads finder-data custom-deps
@@ -182,7 +179,7 @@
 # Update the AUTHORS file.
 
 update-authors:
-       $(emacs) -l authors -f batch-update-authors $(srcdir)/etc/AUTHORS 
$(srcdir)
+       $(emacs) -l authors -f batch-update-authors $(top_srcdir)/etc/AUTHORS 
$(top_srcdir)
 
 TAGS TAGS-LISP: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) 
$(lisptagsfiles4)
        els=`echo $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) 
$(lisptagsfiles4) | sed -e "s,$(lisp)/[^ ]*loaddefs[^ ]*,," -e 
"s,$(lisp)/ldefs-boot[^ ]*,,"`; \
@@ -1513,8 +1510,7 @@
 # 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
-       emacswd=`pwd`/; \
-       $(MAKE) $(MFLAGS) compile-main EMACS=$(EMACS); \
+       $(MAKE) $(MFLAGS) compile-main EMACS=$(EMACS)
        $(MAKE) $(MFLAGS) compile-last EMACS=$(EMACS)
 
 ## Doing this causes make install to dump another emacs.
@@ -1525,12 +1521,11 @@
 # set the local variable no-byte-compile.
 compile-always: doit
        cd $(lisp); rm -f *.elc */*.elc */*/*.elc */*/*/*.elc
-       emacswd=`pwd`/; \
        $(MAKE) $(MFLAGS) compile EMACS=$(EMACS)
 
 ## In case any files are missing from ELCFILES.
 compile-last:
-       @emacswd=`pwd`/; cd $(lisp); $(setwins); \
+       @cd $(lisp); $(setwins); \
        els=`echo "$$wins " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.el 
|g'`; \
        for el in $$els; do \
          test -f $$el || continue; \

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-03-21 11:27:46 +0000
+++ b/src/ChangeLog     2010-03-21 11:57:49 +0000
@@ -1,8 +1,8 @@
 2010-03-21  Andreas Schwab  <address@hidden>
 
-       * Makefile.in (.el.elc): Expand ${bootstrap_exe} before chdir.
-       (${lispsource}loaddefs.el): Likewise.
-       (bootstrap-emacs${EXEEXT}): Likewise.
+       * Makefile.in (abs_builddir): Define.
+       (bootstrap_exe): Use it.
+       (VPATH): Use $(srcdir) instead of @address@hidden
 
 2010-03-20  Stefan Monnier  <address@hidden>
 

=== modified file 'src/Makefile.in'
--- a/src/Makefile.in   2010-03-21 11:27:46 +0000
+++ b/src/Makefile.in   2010-03-21 11:57:49 +0000
@@ -33,16 +33,17 @@
 
 # Here are the things that we expect ../configure to edit.
 # We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
address@hidden@
address@hidden@
address@hidden@
address@hidden@
address@hidden@
address@hidden@
address@hidden@
address@hidden@
address@hidden@
address@hidden@
+srcdir = @srcdir@
+abs_builddir = @abs_builddir@
+VPATH = $(srcdir)
+CC = @CC@
+CPP = @CPP@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LN_S = @LN_S@
+EXEEXT = @EXEEXT@
+version = @version@
 # Substitute an assignment for the MAKE variable, because
 # BSD doesn't have it as a default.
 @SET_MAKE@
@@ -63,7 +64,7 @@
 S_FILE = ${srcdir}/@opsysfile@
 config_h = config.h $(M_FILE) $(S_FILE)
 
-bootstrap_exe = `pwd`/bootstrap-emacs${EXEEXT}
+bootstrap_exe = ${abs_builddir}/bootstrap-emacs${EXEEXT}
 
 OTHER_FILES = @OTHER_FILES@
 
@@ -1332,15 +1333,14 @@
    separately below.
    With GNU Make, we would just say "%.el : %.elc $(BOOTSTRAPEMACS)"  */
 .el.elc:
-       @EMACS=${bootstrap_exe}; \
-       cd ../lisp; $(MAKE) $(MFLAGS) compile-onefile THEFILE=$< EMACS=$$EMACS
+       @cd ../lisp; $(MAKE) $(MFLAGS) compile-onefile \
+                            THEFILE=$< EMACS=${bootstrap_exe}
 
 /* Since the .el.elc rule cannot specify an extra dependency, we do it here.  
*/
 ${lisp} ${SOME_MACHINE_LISP}: $(BOOTSTRAPEMACS)
 
 ${lispsource}loaddefs.el: $(BOOTSTRAPEMACS)
-       EMACS=${bootstrap_exe}; \
-       cd ../lisp; $(MAKE) $(MFLAGS) autoloads EMACS=$$EMACS
+       cd ../lisp; $(MAKE) $(MFLAGS) autoloads EMACS=${bootstrap_exe}
 
 /* Dump an Emacs executable named bootstrap-emacs containing the
    files from loadup.el in source form.  */
@@ -1354,8 +1354,7 @@
        mv -f emacs${EXEEXT} bootstrap-emacs${EXEEXT}
 #endif /* ! defined (CANNOT_DUMP) */
        @: Compile some files earlier to speed up further compilation.
-       EMACS=${bootstrap_exe}; \
-       cd ../lisp; $(MAKE) $(MFLAGS) compile-first EMACS=$$EMACS
+       cd ../lisp; $(MAKE) $(MFLAGS) compile-first EMACS=${bootstrap_exe}
 
 #ifdef AUTO_DEPEND
 ALLOBJS=$(STARTFILES) ${obj} ${otherobj} prefix-args.o


reply via email to

[Prev in Thread] Current Thread [Next in Thread]