* lisp/bookmark.el (bookmark-show-annotation): Use `when' instead of `if'.
[bpt/emacs.git] / lisp / Makefile.in
index cc91894..4effddd 100644 (file)
@@ -30,7 +30,7 @@ VPATH = $(srcdir)
 
 # 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.
+# to use an absolute file name.
 EMACS = ${abs_top_builddir}/src/emacs
 
 # Command line flags for Emacs.  This must include --multibyte,
@@ -84,28 +84,25 @@ COMPILE_FIRST = \
 emacs = EMACSLOADPATH=$(lisp) LC_ALL=C $(EMACS) $(EMACSOPT)
 
 # Common command to find subdirectories
-
 setwins=subdirs=`(find . -type d -print)`; \
        for file in $$subdirs; do \
-          case $$file in */Old | */RCS | */CVS | */CVS/* | */.* | */.*/* | */=* ) ;; \
+          case $$file in */.* | */.*/* | */=* ) ;; \
                *) wins="$$wins $$file" ;; \
           esac; \
         done
 
 # Find all subdirectories except `obsolete' and `term'.
-
 setwins_almost=subdirs=`(find . -type d -print)`; \
        for file in $$subdirs; do \
-          case $$file in */Old | */RCS | */CVS | */CVS/* | */.* | */.*/* | */=* | */obsolete | */term ) ;; \
+          case $$file in */.* | */.*/* | */=* | */obsolete | */term ) ;; \
                *) wins="$$wins $$file" ;; \
           esac; \
         done
 
 # Find all subdirectories in which we might want to create subdirs.el
-
 setwins_for_subdirs=subdirs=`(find . -type d -print)`; \
        for file in $$subdirs; do \
-          case $$file in */Old | */RCS | */CVS | */CVS/* | */.* | */.*/* | */=* | */cedet* ) ;; \
+          case $$file in */.* | */.*/* | */=* | */cedet* ) ;; \
                *) wins="$$wins $$file" ;; \
           esac; \
         done
@@ -151,7 +148,7 @@ finder-data: doit
 autoloads: $(LOADDEFS) doit
        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
+         $(lisp)/dired.el $(lisp)/ibuffer.el $(lisp)/htmlfontify.el
        cd $(lisp); $(setwins_almost); \
        echo Directories: $$wins; \
        $(emacs) -l autoload --eval '(setq generated-autoload-file "$(lisp)/loaddefs.el")' -f batch-update-autoloads $$wins
@@ -235,18 +232,30 @@ 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:
-       @cd $(lisp); $(setwins); \
+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 \
          test -f $$el || continue; \
          test ! -f $${el}c && GREP_OPTIONS= grep '^;.*no-byte-compile: t' $$el > /dev/null && continue; \
          echo "$${el}c"; \
-       done | xargs echo | \
+       done | xargs echo) | \
        while read chunk; do \
          $(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.