### @configure_input@
-# Copyright (C) 2000-2013 Free Software Foundation, Inc.
+# Copyright (C) 2000-2014 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
BIG_STACK_DEPTH = 2200
BIG_STACK_OPTS = --eval "(setq max-lisp-eval-depth $(BIG_STACK_DEPTH))"
-BYTE_COMPILE_FLAGS = $(BIG_STACK_OPTS) $(BYTE_COMPILE_EXTRA_FLAGS)
+# Set load-prefer-newer for the benefit of the non-bootstrappers.
+BYTE_COMPILE_FLAGS = $(BIG_STACK_OPTS) \
+ --eval '(setq load-prefer-newer t)' $(BYTE_COMPILE_EXTRA_FLAGS)
# Files to compile before others during a bootstrap. This is done to
# speed up the bootstrap process. They're ordered by size, so we use
# The actual Emacs command run in the targets below.
# Prevent any setting of EMACSLOADPATH in user environment causing problems.
-emacs = unset EMACSLOADPATH; "$(EMACS)" $(EMACSOPT)
+emacs = EMACSLOADPATH= '$(EMACS)' $(EMACSOPT)
# Common command to find subdirectories
-setwins=subdirs=`find . -type d -print`; \
- for file in $$subdirs; do \
- case $$file in */.* | */.*/* | */=* ) ;; \
+setwins=for file in `find . -type d -print`; do \
+ case $$file in */.* ) ;; \
*) wins="$$wins$${wins:+ }$$file" ;; \
esac; \
- done
+ done
# Find all subdirectories except `obsolete' and `term'.
-setwins_almost=subdirs=`find . -type d -print`; \
- for file in $$subdirs; do \
- case $$file in */.* | */.*/* | */=* | */obsolete | */term ) ;; \
- *) wins="$$wins$${wins:+ }$$file" ;; \
+setwins_almost=for file in `find ${srcdir} -type d -print`; do \
+ case $$file in ${srcdir}*/obsolete | ${srcdir}*/term ) ;; \
+ *) wins="$$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 */.* | */.*/* | */=* | */cedet* ) ;; \
- *) wins="$$wins$${wins:+ }$$file" ;; \
+# Find all subdirectories except `obsolete', `term', and `leim' (and subdirs).
+# We don't want the leim files listed as packages, especially
+# since many share basenames with files in language/.
+setwins_finder=for file in `find ${srcdir} -type d -print`; do \
+ case $$file in ${srcdir}*/obsolete | ${srcdir}*/term | ${srcdir}*/leim* ) ;; \
+ *) wins="$$wins$${wins:+ }$$file" ;; \
+ esac; \
+ done
+
+# Find all subdirectories in which we might want to create subdirs.el.
+setwins_for_subdirs=for file in `find ${srcdir} -type d -print`; do \
+ case $$file in \
+ ${srcdir}*/cedet* | ${srcdir}*/leim* ) ;; \
+ *) wins="$$wins$${wins:+ }$$file" ;; \
esac; \
done
$(lisp)/cus-load.el:
$(MAKE) $(MFLAGS) custom-deps
custom-deps: doit
- thisdir=`pwd`; cd $(lisp) && $(setwins_almost); cd "$$thisdir"; \
+ $(setwins_almost); \
echo Directories: $$wins; \
- $(emacs) --chdir $(lisp) -l cus-dep -f custom-make-dependencies $$wins
+ $(emacs) -l cus-dep \
+ --eval '(setq generated-custom-dependencies-file (unmsys--file-name "$(srcdir)/cus-load.el"))' \
+ -f custom-make-dependencies $$wins
$(lisp)/finder-inf.el:
$(MAKE) $(MFLAGS) finder-data
finder-data: doit
- thisdir=`pwd`; cd $(lisp) && $(setwins_almost); cd "$$thisdir"; \
+ $(setwins_finder); \
echo Directories: $$wins; \
- $(emacs) --chdir $(lisp) -l finder \
+ $(emacs) -l finder \
+ --eval '(setq generated-finder-keywords-file (unmsys--file-name "$(srcdir)/finder-inf.el"))' \
-f finder-compile-keywords-make-dist $$wins
# The chmod +w is to handle env var CVSREAD=1.
# Use expand-file-name rather than $abs_scrdir so that Emacs does not
# get confused when it compares file-names for equality.
+#
+# Note that we set no-update-autoloads in _generated_ leim files.
+# If you want to allow autoloads in such files, remove that,
+# and make this depend on leim.
autoloads: $(LOADDEFS) doit
cd $(lisp) && chmod +w $(AUTOGEN_VCS)
- thisdir=`pwd`; cd $(lisp) && $(setwins_almost); cd "$$thisdir"; \
+ $(setwins_almost); \
echo Directories: $$wins; \
- $(emacs) --chdir $(lisp) -l autoload \
+ $(emacs) -l autoload \
--eval '(setq autoload-builtin-package-versions t)' \
- --eval '(setq generated-autoload-file (expand-file-name "loaddefs.el"))' \
+ --eval '(setq generated-autoload-file (expand-file-name (unmsys--file-name "$(srcdir)/loaddefs.el")))' \
-f batch-update-autoloads $$wins
# This is required by the bootstrap-emacs target in ../src/Makefile, so
$(lisp)/subdirs.el:
$(MAKE) $(MFLAGS) update-subdirs
update-subdirs: doit
- cd $(lisp) && $(setwins_for_subdirs); \
+ $(setwins_for_subdirs); \
for file in $$wins; do \
- ../build-aux/update-subdirs $$file; \
+ $(srcdir)/../build-aux/update-subdirs $$file; \
done;
.PHONY: updates bzr-update update-authors
# Compile all the Elisp files that need it. Beware: it approximates
# `no-byte-compile', so watch out for false-positives!
-compile-main: compile-clean
+compile-main: leim semantic compile-clean
@(cd $(lisp) && $(setwins); \
els=`echo "$$wins " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.el |g'`; \
for el in $$els; do \
fi \
done
+.PHONY: leim semantic
+leim:
+ cd ../leim && $(MAKE) $(MFLAGS) all EMACS="$(EMACS)"
+
+# FIXME. Yuck.
+semantic:
+ case ${EMACS} in \
+ .*) EMACS="../${EMACS}" ;; \
+ *) EMACS="${EMACS}" ;; \
+ esac; \
+ cd ../admin/grammars && $(MAKE) $(MFLAGS) all EMACS="$${EMACS}"
+
# 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.