# 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.
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
$(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) $(EMACSOPT) -l cus-dep --eval '(setq generated-custom-dependencies-file "$(lisp)/cus-load.el")' -f custom-make-dependencies $$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) $(EMACSOPT) -l finder --eval '(setq generated-finder-keywords-file "$(lisp)/finder-inf.el")' -f finder-compile-keywords-make-dist $$wins
+ LC_ALL=C $(emacs) -l finder --eval '(setq generated-finder-keywords-file "$(lisp)/finder-inf.el")' -f finder-compile-keywords-make-dist $$wins
$(lisp)/loaddefs.el:
echo ";;; loaddefs.el --- automatically extracted autoloads" >> $@
autoloads: $(lisp)/subdirs.el $(lisp)/loaddefs.el doit
wd=$(lisp); $(setwins_almost); \
echo Directories: $$wins; \
- LC_ALL=C $(EMACS) $(EMACSOPT) -l autoload --eval '(setq generated-autoload-file "$(lisp)/loaddefs.el")' -f batch-update-autoloads $$wins
+ LC_ALL=C $(emacs) -l autoload --eval '(setq generated-autoload-file "$(lisp)/loaddefs.el")' -f batch-update-autoloads $$wins
$(lisp)/subdirs.el:
$(MAKE) $(MFLAGS) update-subdirs
# Update the AUTHORS file.
update-authors:
- $(emacs) -l authors -f batch-update-authors $(srcdir)/AUTHORS $(srcdir)
+ $(emacs) -l authors -f batch-update-authors $(srcdir)/etc/AUTHORS $(srcdir)
TAGS: $(lisptagsfiles1) $(lisptagsfiles2)
els=`echo $(lisptagsfiles1) $(lisptagsfiles2) | sed -e "s,$(lisp)/loaddefs[^ ]*,," -e "s,$(lisp)/ldefs-boot[^ ]*,,"`; \
.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
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
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
# new ones.
recompile: doit mh-autoloads $(lisp)/progmodes/cc-mode.elc
- LC_ALL=C $(EMACS) $(EMACSOPT) --eval "(batch-byte-recompile-directory 0)" $(lisp)
+ LC_ALL=C $(emacs) --eval "(batch-byte-recompile-directory 0)" $(lisp)
# CC Mode uses a compile time macro system which causes a compile time
# dependency in cc-mode.elc on the macros in cc-langs.el and the
$(lisp)/progmodes/cc-mode.el \
$(lisp)/progmodes/cc-langs.el \
$(lisp)/progmodes/cc-defs.el
- $(EMACS) $(EMACSOPT) -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
$(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:" >> $@
echo ";; no-update-autoloads: t" >> $@
echo ";; End:" >> $@
echo ";;; mh-loaddefs.el ends here" >> $@
- $(EMACS) $(EMACSOPT) \
+ $(emacs) \
-l autoload \
--eval "(setq generate-autoload-cookie \";;;###mh-autoload\")" \
--eval "(setq generated-autoload-file \"$(lisp)/mh-e/mh-loaddefs.el\")" \
$(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
distclean:
-rm -f ./Makefile
+.PHONY: check-declare
+
+check-declare:
+ $(emacs) -l $(lisp)/emacs-lisp/check-declare \
+ --eval '(check-declare-directory "$(lisp)")'
+
# Makefile ends here.