EasyPG: Rename epa-mail-minor-mode to epa-global-mail-mode.
[bpt/emacs.git] / lisp / Makefile.in
index 39d74ce..8af2485 100644 (file)
@@ -1,6 +1,6 @@
 # Maintenance productions for the Lisp directory
 # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005,
-#   2006, 2007 Free Software Foundation, Inc.
+#   2006, 2007, 2008 Free Software Foundation, Inc.
 
 # This file is part of GNU Emacs.
 
@@ -35,6 +35,12 @@ EMACS = ../src/emacs
 
 EMACSOPT = -batch --no-site-file --multibyte
 
+# Extra flags to pass to the byte compiler
+BYTE_COMPILE_EXTRA_FLAGS = 
+# For example to not display the undefined function warnings you can use this:
+# BYTE_COMPILE_EXTRA_FLAGS = --eval '(setq byte-compile-warnings (quote (not unresolved)))'
+# The example above is just for developers, it should not be used by default.
+
 SOURCES = *.el COPYING Makefile
 lisptagsfiles1 = $(lisp)/[a-zA-Z]*.el
 lisptagsfiles2 = $(lisp)/[a-zA-Z]*/[a-zA-Z]*.el
@@ -89,12 +95,16 @@ doit:
 
 $(lisp)/cus-load.el:
        touch $@
-custom-deps: $(lisp)/subdirs.el $(lisp)/loaddefs.el $(lisp)/cus-load.el doit
+# Note that custom-deps and finder-data depend on autoloads rather
+# than on loaddefs.el, so that autoloads does not run in parallel with
+# them under "make -j", because that could delete loaddefs.el from
+# under their feet.
+custom-deps: $(lisp)/subdirs.el autoloads $(lisp)/cus-load.el doit
        wd=$(lisp); $(setwins_almost); \
        echo Directories: $$wins; \
        LC_ALL=C $(emacs) -l cus-dep --eval '(setq generated-custom-dependencies-file "$(lisp)/cus-load.el")' -f custom-make-dependencies $$wins
 
-finder-data: $(lisp)/subdirs.el $(lisp)/loaddefs.el doit
+finder-data: $(lisp)/subdirs.el autoloads doit
        wd=$(lisp); $(setwins_almost); \
        echo Directories: $$wins; \
        LC_ALL=C $(emacs) -l finder --eval '(setq generated-finder-keywords-file "$(lisp)/finder-inf.el")' -f finder-compile-keywords-make-dist $$wins
@@ -143,7 +153,7 @@ TAGS-LISP: $(lisptagsfiles1) $(lisptagsfiles2)
 .SUFFIXES: .elc .el
 
 .el.elc: $(lisp)/subdirs.el
-       -$(emacs) -f batch-byte-compile $<
+       -$(emacs)  $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $<
 
 # Compile all Lisp files, but don't recompile those that are up to
 # date.  Some files don't actually get compiled because they set the
@@ -168,7 +178,7 @@ compile: $(lisp)/subdirs.el mh-autoloads doit
          if test -f $$el; \
          then \
            echo Compiling $$el; \
-           $(emacs) -f batch-byte-compile-if-not-done $$el || exit 1; \
+           $(emacs)  $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile-if-not-done $$el || exit 1; \
          fi \
        done
 
@@ -187,14 +197,14 @@ compile-always: $(lisp)/subdirs.el mh-autoloads doit
          if test -f $$el; \
          then \
            echo Compiling $$el; \
-           $(emacs) -f batch-byte-compile $$el || exit 1; \
+           $(emacs)  $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $$el || exit 1; \
          fi \
        done
 
 compile-calc:
        for el in `find $(lisp)/calc -name '*.el'`; do \
          echo Compiling $$el; \
-         $(emacs) -f batch-byte-compile $$el || exit 1; \
+         $(emacs)  $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $$el || exit 1; \
        done
 
 # Backup compiled Lisp files in elc.tar.gz.  If that file already
@@ -221,7 +231,7 @@ $(lisp)/progmodes/cc-mode.elc: \
        $(lisp)/progmodes/cc-mode.el \
        $(lisp)/progmodes/cc-langs.el \
        $(lisp)/progmodes/cc-defs.el
-       $(emacs) -f batch-byte-compile $(lisp)/progmodes/cc-mode.el
+       $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $(lisp)/progmodes/cc-mode.el
 
 # Update MH-E internal autoloads. These are not to be confused with
 # the autoloads for the MH-E entry points, which are already in
@@ -244,7 +254,7 @@ mh-autoloads: $(lisp)/mh-e/mh-loaddefs.el
 $(lisp)/mh-e/mh-loaddefs.el: $(lisp)/subdirs.el $(MH_E_SRC)
        echo ";;; mh-loaddefs.el --- automatically extracted autoloads" > $@
        echo "" >> $@
-       echo ";; Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc." >> $@
+       echo ";; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc." >> $@
        echo ";; Author: Bill Wohler <wohler@newt.com>" >> $@
        echo ";; Keywords: mail" >> $@
        echo ";;; Commentary:" >> $@
@@ -291,9 +301,12 @@ bootstrap-prepare:
          $(lisp)/ps-print.el                   \
          $(lisp)/emacs-lisp/cl-loaddefs.el
 
-maintainer-clean: distclean
-       cd $(lisp); rm -f *.elc */*.elc $(AUTOGENEL)
+maintainer-clean: distclean bootstrap-clean
+       cd $(lisp); rm -f $(AUTOGENEL)
 
+## NB note that this rules assume only one level of subdirs below lisp/.
+## If nested subdirs are added, it's probably time to switch to:
+## find $(lisp) -name "*.elc" -exec rm -f '{}' ';'
 bootstrap-clean:
        cd $(lisp); rm -f *.elc */*.elc
 
@@ -309,4 +322,10 @@ bootstrap-after: finder-data custom-deps
 distclean:
        -rm -f ./Makefile
 
+.PHONY: check-declare
+
+check-declare:
+       $(emacs) -l $(lisp)/emacs-lisp/check-declare \
+         --eval '(check-declare-directory "$(lisp)")'
+
 # Makefile ends here.