diff options
| author | Gerd Moellmann | 1999-10-08 21:54:44 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 1999-10-08 21:54:44 +0000 |
| commit | 57f707e72d04e232cf2e3c0b25d9380f9106f6dd (patch) | |
| tree | fe23f513a8b847d1a3b9bad5dfa8513b8a5a918f | |
| parent | 11e4de5d25025ebb8fe77fdc5a53c69b1a6c65ca (diff) | |
| download | emacs-57f707e72d04e232cf2e3c0b25d9380f9106f6dd.tar.gz emacs-57f707e72d04e232cf2e3c0b25d9380f9106f6dd.zip | |
(compile): Compile files one by one. Set load-path to
current directory and subdirectories when compiling.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/Makefile | 23 |
2 files changed, 23 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9b2897a713b..b81771d8f36 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 1999-10-08 Gerd Moellmann <gerd@gnu.org> | 1 | 1999-10-08 Gerd Moellmann <gerd@gnu.org> |
| 2 | 2 | ||
| 3 | * Makefile (compile): Compile files one by one. Set load-path to | ||
| 4 | current directory and subdirectories when compiling. | ||
| 5 | |||
| 6 | 1999-10-08 Gerd Moellmann <gerd@gnu.org> | ||
| 7 | |||
| 3 | * Makefile (EMACSOPT, DONTCOMPILE, EL): New. | 8 | * Makefile (EMACSOPT, DONTCOMPILE, EL): New. |
| 4 | (emacs): Use it everywhere instead of EMACS. | 9 | (emacs): Use it everywhere instead of EMACS. |
| 5 | (compile): New target. Compile all Lisp files from scratch. | 10 | (compile): New target. Compile all Lisp files from scratch. |
diff --git a/lisp/Makefile b/lisp/Makefile index 838c1532552..3e10f639d23 100644 --- a/lisp/Makefile +++ b/lisp/Makefile | |||
| @@ -115,8 +115,24 @@ TAGS-LISP: $(lispsource)$(lisptagsfiles1) $(lispsource)$(lisptagsfiles2) | |||
| 115 | # Compile all Lisp files, except those from DONTCOMPILE. This | 115 | # Compile all Lisp files, except those from DONTCOMPILE. This |
| 116 | # compiles files unconditionally. All .elc files are made writable | 116 | # compiles files unconditionally. All .elc files are made writable |
| 117 | # before compilation in case we checked out read-only (CVS option -r). | 117 | # before compilation in case we checked out read-only (CVS option -r). |
| 118 | # Files must be compiled one by one, otherwise apparently | ||
| 119 | # eval-when-compile's in some Lisp files make problems in files being | ||
| 120 | # compiled later. We also set the load-path of the Emacs used for | ||
| 121 | # compilation to the current directory and its subdirectories, to | ||
| 122 | # make sure require's and load's in the files being compiled find | ||
| 123 | # the right files. | ||
| 118 | 124 | ||
| 119 | compile: doit | 125 | compile: doit |
| 126 | wd=`pwd`; \ | ||
| 127 | find $$wd -name "*.elc" | xargs chmod +w; \ | ||
| 128 | subdirs=`find $$wd -type d -print`; \ | ||
| 129 | for dir in $$subdirs; do \ | ||
| 130 | case $$dir in \ | ||
| 131 | */Old | */RCS | */CVS | */=* ) ;; \ | ||
| 132 | *) loadpath="$$loadpath \"$$dir\"" ;; \ | ||
| 133 | esac; \ | ||
| 134 | done; \ | ||
| 135 | loadpath="(setq load-path '($$loadpath))"; \ | ||
| 120 | dont_compile=`echo $(DONTCOMPILE)`; \ | 136 | dont_compile=`echo $(DONTCOMPILE)`; \ |
| 121 | for el in $(EL); do \ | 137 | for el in $(EL); do \ |
| 122 | compile_it=y; \ | 138 | compile_it=y; \ |
| @@ -126,14 +142,11 @@ compile: doit | |||
| 126 | fi; \ | 142 | fi; \ |
| 127 | done; \ | 143 | done; \ |
| 128 | if test $$compile_it = y; then \ | 144 | if test $$compile_it = y; then \ |
| 129 | els="$$el $$els"; \ | 145 | $(emacs) --eval "$$loadpath" -f batch-byte-compile $$el; \ |
| 130 | echo "Compile $$el"; \ | ||
| 131 | else \ | 146 | else \ |
| 132 | echo "Don't compile $$el"; \ | 147 | echo "Don't compile $$el"; \ |
| 133 | fi; \ | 148 | fi; \ |
| 134 | done; \ | 149 | done |
| 135 | chmod +w $$els; \ | ||
| 136 | $(emacs) -f batch-byte-compile $$els; | ||
| 137 | 150 | ||
| 138 | # Recompile all Lisp files which are newer than their .elc files. | 151 | # Recompile all Lisp files which are newer than their .elc files. |
| 139 | # Note that this doesn't create .elc files. It only recompiles if an | 152 | # Note that this doesn't create .elc files. It only recompiles if an |