diff options
author | Phillip Lord <phillip.lord@russet.org.uk> | 2017-02-27 21:23:35 +0000 |
---|---|---|
committer | Phillip Lord <phillip.lord@russet.org.uk> | 2017-02-28 21:32:49 +0000 |
commit | 7b5e1c8238ef961fd3305b1dce053b9bced684ba (patch) | |
tree | a992d47052b5186a1c344a1f4a86d6b8aadc84ff /src/Makefile.in | |
parent | 75727406535572fb8d18e0c4d92f5a033a1a0933 (diff) | |
download | emacs-7b5e1c8238ef961fd3305b1dce053b9bced684ba.tar.gz |
Speed generation of ldefs-boot-auto
Previously, generation of ldefs-boot-auto required at least one full
bootstrap and, in extreme cases, two. Now, from build system, it
requires the same time as taken to dump Emacs.
* Makefile.in: Remove all calls, pass to src.
* admin/ldefs-clean.el: Update for changed messages.
* lisp/Makefile.in (compile-first-delete): Add.
* lisp/ldefs-boot-auto.el: Update.
* src/Makefile.in (generate-ldefs-boot): Add.
Diffstat (limited to 'src/Makefile.in')
-rw-r--r-- | src/Makefile.in | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/Makefile.in b/src/Makefile.in index ab319837249..730f79801c3 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -761,9 +761,30 @@ endif @: Compile some files earlier to speed up further compilation. $(MAKE) -C ../lisp compile-first EMACS="$(bootstrap_exe)" +shortlisp-keep=loadup.el loaddefs.el + +## Generating ldefs-boot-auto.el requires that we dump both emacs and +## the bootstrap-emacs so that we can see which autoloads are actually +## called. This is a slightly messy affair as we must ensure that +## they are build as if from clean, which means deleting all the build +## files first. We use loaddefs.el to make sure that we can build +## from bootstrap; obviously, this assumes that loaddefs.el already +## exists or we have a bootstrap problem! +generate-ldefs-boot: $(lispsource)/loaddefs.el + echo Cleaning to enable generate-ldefs-boot + mv $(lispsource)/loaddefs.el $(lispsource)/ldefs-boot-auto.el + $(MAKE) -C $(lispsource) compile-first-delete + -for f in $(filter-out $(shortlisp-keep), $(shortlisp)); do test -e $(lispsource)/$$f && rm -v $(lispsource)/$$f; done + - rm bootstrap-emacs$(EXEEXT) + - rm emacs$(EXEEXT) + echo Building generate-ldefs-boot + $(MAKE) -j 1 emacs$(EXEEXT) \ + GENERATE_LDEFS_BOOT="generate-ldefs-boot" \ + 2>&1 | tee $(lispsource)/ldefs-boot-auto.temp + echo Reformatting ldefs-boot-auto.el + emacs$(EXEEXT) -batch --load ../admin/ldefs-clean.el --funcall ldefs-clean + rm ../lisp/ldefs-boot-auto.temp -generate-ldefs-boot: bootstrap-emacs$(EXEEXT) - $(RUN_TEMACS) --batch $(BUILD_DETAILS) --load loadup bootstrap ifeq ($(AUTO_DEPEND),yes) -include $(ALLOBJS:%.o=${DEPDIR}/%.d) |