diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-03-22 09:33:21 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-03-22 09:33:21 -0400 |
commit | 64cb11ccee98233ad1c44496f4dd6fed8e64a155 (patch) | |
tree | 6b2f19af536ee7bffe1c16cfbd76142b6f00e789 /lisp/Makefile.in | |
parent | 835e2c65be490714924f9219d3dae461e4237b86 (diff) | |
download | emacs-64cb11ccee98233ad1c44496f4dd6fed8e64a155.tar.gz |
Get rid of .elc files after removal of the corresponding .el.
* Makefile.in (compile-clean): New target.
(compile-main): Use it.
Diffstat (limited to 'lisp/Makefile.in')
-rw-r--r-- | lisp/Makefile.in | 14 |
1 files changed, 13 insertions, 1 deletions
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) # Compile all the Elisp files that need it. Beware: it approximates # `no-byte-compile', so watch out for false-positives! -compile-main: +compile-main: compile-clean @(cd $(lisp); $(setwins); \ els=`echo "$$wins " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.el |g'`; \ for el in $$els; do \ @@ -247,6 +247,18 @@ compile-main: $(MAKE) $(MFLAGS) compile-targets EMACS="$(EMACS)" TARGETS="$$chunk"; \ done +.PHONY: compile-clean +# Erase left-over .elc files that do not have a corresponding .el file. +compile-clean: + @cd $(lisp); $(setwins); \ + elcs=`echo "$$wins " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.elc |g'`; \ + for el in $$(echo $$elcs | sed -e 's/\.elc/\.el/g'); do \ + if test -f "$$el" -o \! -f "$${el}c"; then :; else \ + echo rm "$${el}c"; \ + rm "$${el}c"; \ + fi \ + done + # Compile all Lisp files, but don't recompile those that are up to # date. Some .el files don't get compiled because they set the # local variable no-byte-compile. |