summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2002-02-01 04:13:14 +0000
committerRichard M. Stallman <rms@gnu.org>2002-02-01 04:13:14 +0000
commit61b92c330e136eee127449d1fc5e68680ca38b87 (patch)
tree54bc9df949c294bdbf3df0b0de93058738302905 /lisp
parent024ab5b50476c6bf0d3bd1ddf1cd9d0aef2cdda6 (diff)
downloademacs-61b92c330e136eee127449d1fc5e68680ca38b87.tar.gz
emacs-61b92c330e136eee127449d1fc5e68680ca38b87.tar.bz2
emacs-61b92c330e136eee127449d1fc5e68680ca38b87.zip
(compile): New target.
(compile-always): Renamed from compile-files. (compile-after-backup): Renamed from compile. (bootstrap): Depend on compile-always, not compile-files.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/Makefile.in26
1 files changed, 21 insertions, 5 deletions
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
index 2c1e29c64b0..2ec3b6d8137 100644
--- a/lisp/Makefile.in
+++ b/lisp/Makefile.in
@@ -202,8 +202,10 @@ TAGS-LISP: $(lisptagsfiles1) $(lisptagsfiles2)
$(DONTCOMPILE:.el=.elc):
-rm -f $@
-# Compile all Lisp files, except those from DONTCOMPILE. This
-# compiles files unconditionally. All .elc files are made writable
+# Compile all Lisp files, except those from DONTCOMPILE,
+# but don't recompile those that are up to date.
+
+# All .elc files are made writable
# before compilation in case we checked out read-only (CVS option -r).
# Files MUST be compiled one by one. If we compile several files in a
# row we can't make sure that the compilation environment is clean.
@@ -211,7 +213,21 @@ $(DONTCOMPILE:.el=.elc):
# current directory and its subdirectories, to make sure require's and
# load's in the files being compiled find the right files.
-compile-files: subdirs.el doit
+compile: subdirs.el doit
+ find $(lisp) -name "*.elc" -print | xargs chmod +w >/dev/null 2>&1; \
+ wd=$(lisp); $(setwins); \
+ elpat=`echo $$wins | tr ' ' '\012\012' | \
+ sed -e 's|\(.\)$$|\1/|' -e 's|^\./||' -e 's|$$|*.el|'`; \
+ els=`echo $$elpat $(DONTCOMPILE) $(COMPILE_FIRST) | \
+ tr ' ' '\012\012' | sort | uniq -u`; \
+ for el in $(COMPILE_FIRST) $$els; do \
+ echo Compiling $$el; \
+ $(emacs) -f batch-byte-compile-if-not-done $$el || exit 1; \
+ done
+
+# Compile all Lisp files, except those from DONTCOMPILE. This
+# is like `compile' but compiles files unconditionally.
+compile-always: subdirs.el doit
find $(lisp) -name "*.elc" -print | xargs chmod +w >/dev/null 2>&1; \
wd=$(lisp); $(setwins); \
elpat=`echo $$wins | tr ' ' '\012\012' | \
@@ -238,7 +254,7 @@ backup-compiled-files:
# Compile Lisp files, but save old compiled files first.
-compile: backup-compiled-files compile-files
+compile-after-backup: backup-compiled-files compile-always
# Recompile all Lisp files which are newer than their .elc files.
# Note that this doesn't create .elc files. It only recompiles if an
@@ -259,7 +275,7 @@ bootstrap-clean:
# Generate/update files for the bootstrap process.
-bootstrap: autoloads compile-files custom-deps
+bootstrap: autoloads compile-always custom-deps
distclean:
-rm -f ./Makefile