diff options
| author | Stefan Monnier | 2010-03-22 09:33:21 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2010-03-22 09:33:21 -0400 |
| commit | 64cb11ccee98233ad1c44496f4dd6fed8e64a155 (patch) | |
| tree | 6b2f19af536ee7bffe1c16cfbd76142b6f00e789 | |
| parent | 835e2c65be490714924f9219d3dae461e4237b86 (diff) | |
| download | emacs-64cb11ccee98233ad1c44496f4dd6fed8e64a155.tar.gz emacs-64cb11ccee98233ad1c44496f4dd6fed8e64a155.zip | |
Get rid of .elc files after removal of the corresponding .el.
* Makefile.in (compile-clean): New target.
(compile-main): Use it.
| -rw-r--r-- | lisp/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/Makefile.in | 14 |
2 files changed, 21 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2a059b8167b..afce3835ed2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2010-03-22 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | Get rid of .elc files after removal of the corresponding .el. | ||
| 4 | * Makefile.in (compile-clean): New target. | ||
| 5 | (compile-main): Use it. | ||
| 6 | |||
| 1 | 2010-03-22 Jan Djärv <jan.h.d@swipnet.se> | 7 | 2010-03-22 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 8 | ||
| 3 | * Makefile.in (compile-main): cd to $(lisp) in a sub-shell, so we | 9 | * Makefile.in (compile-main): cd to $(lisp) in a sub-shell, so we |
| @@ -19,7 +25,8 @@ | |||
| 19 | (srcdir): Don't append `/..'. | 25 | (srcdir): Don't append `/..'. |
| 20 | (EMACS): Use ${abs_top_builddir}. | 26 | (EMACS): Use ${abs_top_builddir}. |
| 21 | (all, compile, compile-always, compile-last): Don't set emacswd. | 27 | (all, compile, compile-always, compile-last): Don't set emacswd. |
| 22 | (update-subdirs, update-authors): Use $(top_srcdir) instead of $(srcdir). | 28 | (update-subdirs, update-authors): Use $(top_srcdir) instead of |
| 29 | $(srcdir). | ||
| 23 | (lisp): Use $(srcdir) instead of @srcdir@. | 30 | (lisp): Use $(srcdir) instead of @srcdir@. |
| 24 | 31 | ||
| 25 | 2010-03-21 Juri Linkov <juri@jurta.org> | 32 | 2010-03-21 Juri Linkov <juri@jurta.org> |
diff --git a/lisp/Makefile.in b/lisp/Makefile.in index f1219a807c7..21822a82ca4 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in | |||
| @@ -235,7 +235,7 @@ compile-targets: $(TARGETS) | |||
| 235 | 235 | ||
| 236 | # Compile all the Elisp files that need it. Beware: it approximates | 236 | # Compile all the Elisp files that need it. Beware: it approximates |
| 237 | # `no-byte-compile', so watch out for false-positives! | 237 | # `no-byte-compile', so watch out for false-positives! |
| 238 | compile-main: | 238 | compile-main: compile-clean |
| 239 | @(cd $(lisp); $(setwins); \ | 239 | @(cd $(lisp); $(setwins); \ |
| 240 | els=`echo "$$wins " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.el |g'`; \ | 240 | els=`echo "$$wins " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.el |g'`; \ |
| 241 | for el in $$els; do \ | 241 | for el in $$els; do \ |
| @@ -247,6 +247,18 @@ compile-main: | |||
| 247 | $(MAKE) $(MFLAGS) compile-targets EMACS="$(EMACS)" TARGETS="$$chunk"; \ | 247 | $(MAKE) $(MFLAGS) compile-targets EMACS="$(EMACS)" TARGETS="$$chunk"; \ |
| 248 | done | 248 | done |
| 249 | 249 | ||
| 250 | .PHONY: compile-clean | ||
| 251 | # Erase left-over .elc files that do not have a corresponding .el file. | ||
| 252 | compile-clean: | ||
| 253 | @cd $(lisp); $(setwins); \ | ||
| 254 | elcs=`echo "$$wins " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.elc |g'`; \ | ||
| 255 | for el in $$(echo $$elcs | sed -e 's/\.elc/\.el/g'); do \ | ||
| 256 | if test -f "$$el" -o \! -f "$${el}c"; then :; else \ | ||
| 257 | echo rm "$${el}c"; \ | ||
| 258 | rm "$${el}c"; \ | ||
| 259 | fi \ | ||
| 260 | done | ||
| 261 | |||
| 250 | # Compile all Lisp files, but don't recompile those that are up to | 262 | # Compile all Lisp files, but don't recompile those that are up to |
| 251 | # date. Some .el files don't get compiled because they set the | 263 | # date. Some .el files don't get compiled because they set the |
| 252 | # local variable no-byte-compile. | 264 | # local variable no-byte-compile. |