emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r99709: Use more relative file and di


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r99709: Use more relative file and directory names in `lisp' make rules.
Date: Sat, 20 Mar 2010 17:46:31 -0400
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 99709
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Sat 2010-03-20 17:46:31 -0400
message:
  Use more relative file and directory names in `lisp' make rules.
  * lisp/Makefile.in (EMACS): Arrange for it to work when we chdir.
  (setwins, setwins_almost, setwins_for_subdirs):
  Don't `cd'; output relative names.
  (all, compile, compile-always, compile-last): Set emacswd.
  (custom-deps, finder-data, autoloads, update-subdirs, compile-last):
  Just cd to the lisp source dir so we can use relative file names.
  * src/Makefile.in (bootstrap_exe): Use an absolute name.
modified:
  lisp/ChangeLog
  lisp/Makefile.in
  src/ChangeLog
  src/Makefile.in
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-03-20 19:21:44 +0000
+++ b/lisp/ChangeLog    2010-03-20 21:46:31 +0000
@@ -5,6 +5,14 @@
 
 2010-03-20  Stefan Monnier  <address@hidden>
 
+       Use more relative file and directory names.
+       * Makefile.in (EMACS): Arrange for it to work when we chdir.
+       (setwins, setwins_almost, setwins_for_subdirs):
+       Don't `cd'; output relative names.
+       (all, compile, compile-always, compile-last): Set emacswd.
+       (custom-deps, finder-data, autoloads, update-subdirs, compile-last):
+       Just cd to the lisp source dir so we can use relative file names.
+
        * outline.el (hide-sublevels): Unfix the paren non-typo! (bug#5738).
 
 2010-03-20  Glenn Morris  <address@hidden>

=== modified file 'lisp/Makefile.in'
--- a/lisp/Makefile.in  2010-03-20 01:29:12 +0000
+++ b/lisp/Makefile.in  2010-03-20 21:46:31 +0000
@@ -26,7 +26,15 @@
 # You can specify a different executable on the make command line,
 # e.g. "make EMACS=../src/emacs ...".
 
-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
 
 # Command line flags for Emacs.  This must include --multibyte,
 # otherwise some files will not compile.
@@ -80,28 +88,28 @@
 
 # Common command to find subdirectories
 
-setwins=subdirs=`(cd $$wd; find . -type d -print)`; \
+setwins=subdirs=`(find . -type d -print)`; \
        for file in $$subdirs; do \
           case $$file in */Old | */RCS | */CVS | */CVS/* | */.* | */.*/* | 
*/=* ) ;; \
-               *) wins="$$wins $$wd/$$file" ;; \
+               *) wins="$$wins $$file" ;; \
           esac; \
         done
 
 # Find all subdirectories except `obsolete' and `term'.
 
-setwins_almost=subdirs=`(cd $$wd; find . -type d -print)`; \
+setwins_almost=subdirs=`(find . -type d -print)`; \
        for file in $$subdirs; do \
           case $$file in */Old | */RCS | */CVS | */CVS/* | */.* | */.*/* | 
*/=* | */obsolete | */term ) ;; \
-               *) wins="$$wins $$wd/$$file" ;; \
+               *) wins="$$wins $$file" ;; \
           esac; \
         done
 
 # Find all subdirectories in which we might want to create subdirs.el
 
-setwins_for_subdirs=subdirs=`(cd $$wd; find . -type d -print)`; \
+setwins_for_subdirs=subdirs=`(find . -type d -print)`; \
        for file in $$subdirs; do \
           case $$file in */Old | */RCS | */CVS | */CVS/* | */.* | */.*/* | 
*/=* | */cedet* ) ;; \
-               *) wins="$$wins $$wd/$$file" ;; \
+               *) wins="$$wins $$file" ;; \
           esac; \
         done
 
@@ -111,7 +119,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.
-       $(MAKE) $(MFLAGS) compile-last EMACS=$(EMACS)
+       emacswd=`pwd`/; $(MAKE) $(MFLAGS) compile-last EMACS=$(EMACS)
 
 doit:
 
@@ -132,14 +140,14 @@
 $(lisp)/cus-load.el:
        $(MAKE) $(MFLAGS) custom-deps
 custom-deps: doit
-       wd=$(lisp); $(setwins_almost); \
+       emacswd=`pwd`/; 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
-       wd=$(lisp); $(setwins_almost); \
+       emacswd=`pwd`/; 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
 
@@ -149,7 +157,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
-       wd=$(lisp); $(setwins_almost); \
+       emacswd=`pwd`/; cd $(lisp); $(setwins_almost); \
        echo Directories: $$wins; \
        $(emacs) -l autoload --eval '(setq generated-autoload-file 
"$(lisp)/loaddefs.el")' -f batch-update-autoloads $$wins
 
@@ -158,7 +166,7 @@
 $(lisp)/subdirs.el:
        $(MAKE) $(MFLAGS) update-subdirs
 update-subdirs: doit
-       wd=$(lisp); $(setwins_for_subdirs); \
+       cd $(lisp); $(setwins_for_subdirs); \
        for file in $$wins; do \
           $(srcdir)/update-subdirs $$file; \
        done;
@@ -1505,7 +1513,8 @@
 # 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)
+       emacswd=`pwd`/; \
+       $(MAKE) $(MFLAGS) compile-main EMACS=$(EMACS); \
        $(MAKE) $(MFLAGS) compile-last EMACS=$(EMACS)
 
 ## Doing this causes make install to dump another emacs.
@@ -1516,11 +1525,12 @@
 # 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:
-       @wd=$(lisp); $(setwins); \
+       @emacswd=`pwd`/; 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-20 08:11:59 +0000
+++ b/src/ChangeLog     2010-03-20 21:46:31 +0000
@@ -1,3 +1,7 @@
+2010-03-20  Stefan Monnier  <address@hidden>
+
+       * Makefile.in (bootstrap_exe): Use an absolute name.
+
 2010-03-20  Dan Nicolaescu  <address@hidden>
 
        Remove support for old GNU/Linux using libc version 5.

=== modified file 'src/Makefile.in'
--- a/src/Makefile.in   2010-03-20 00:46:01 +0000
+++ b/src/Makefile.in   2010-03-20 21:46:31 +0000
@@ -63,7 +63,7 @@
 S_FILE = ${srcdir}/@opsysfile@
 config_h = config.h $(M_FILE) $(S_FILE)
 
-bootstrap_exe = ../src/bootstrap-emacs${EXEEXT}
+bootstrap_exe = `pwd`/bootstrap-emacs${EXEEXT}
 
 OTHER_FILES = @OTHER_FILES@
 


reply via email to

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