1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-25 07:28:20 +00:00

Create generated lisp files before main loaddefs.el

This should improve reproducibility of lisp/loaddefs.el.
* lisp/Makefile.in (gen-lisp): New phony target.
($(lisp)/loaddefs.el, compile-main): Depend on gen-lisp.
* src/Makefile.in ($(leimdir)/leim-list.el): Depend on all of ../leim.
* lisp/cedet/semantic.el (semantic-mode):
* lisp/cedet/semantic/fw.el (top-level):
* lisp/emacs-lisp/eieio-core.el (top-level):
Robustify to generated input files maybe not yet existing.
This commit is contained in:
Glenn Morris 2017-04-13 20:12:02 -04:00
parent 8201263765
commit ad128fee43
5 changed files with 17 additions and 9 deletions

View File

@ -179,6 +179,10 @@ $(lisp)/finder-inf.el:
# 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.
# Actually this should depend on leim anyway, since no-update-autoloads
# files are still recorded in loaddefs. So we should ensure
# that all input files are generated before we create loaddefs.
# Otherwise making loaddefs again will change the output.
#
# Write to a temporary file in case we're doing a parallel build and a
# CANNOT_DUMP-mode Emacs needs to read loaddefs at startup.
@ -192,7 +196,7 @@ $(lisp)/finder-inf.el:
# slow; starting from an almost-correct content will enable the "only
# update where necessary" feature of batch-update-autoloads.
autoloads .PHONY: $(lisp)/loaddefs.el
$(lisp)/loaddefs.el: $(LOADDEFS)
$(lisp)/loaddefs.el: gen-lisp $(LOADDEFS)
@echo Directories for loaddefs: ${SUBDIRS_ALMOST}
@if test -f $@ ; then cp $@ $(lisp)/loaddefs.tmp ; fi
$(AM_V_GEN)$(emacs) -l autoload \
@ -319,7 +323,7 @@ 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: leim semantic compile-clean
compile-main: gen-lisp compile-clean
@(cd $(lisp) && \
els=`echo "${SUBDIRS_REL} " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.el |g'`; \
for el in $$els; do \
@ -343,7 +347,10 @@ compile-clean:
fi \
done
.PHONY: leim semantic
.PHONY: gen-lisp leim semantic
gen-lisp: leim semantic
leim:
$(MAKE) -C ../leim all EMACS="$(EMACS)"

View File

@ -1116,8 +1116,9 @@ Semantic mode.
;; Enable all the global auxiliary minor modes in
;; `semantic-submode-list'.
(dolist (mode semantic-submode-list)
(if (memq mode semantic-default-submodes)
(funcall mode 1)))
(and (memq mode semantic-default-submodes)
(fboundp mode)
(funcall mode 1)))
(unless semantic-load-system-cache-loaded
(setq semantic-load-system-cache-loaded t)
(when (and (boundp 'semanticdb-default-system-save-directory)
@ -1139,7 +1140,7 @@ Semantic mode.
(add-hook 'completion-at-point-functions
'semantic-analyze-completion-at-point-function)
(if global-ede-mode
(if (bound-and-true-p global-ede-mode)
(define-key cedet-menu-map [cedet-menu-separator] '("--")))
(dolist (b (buffer-list))
(with-current-buffer b

View File

@ -30,7 +30,7 @@
;;
(require 'mode-local)
(require 'eieio)
(load "semantic/loaddefs" nil 'nomessage)
(load "semantic/loaddefs" 'noerror 'nomessage)
;;; Compatibility
;;

View File

@ -33,7 +33,7 @@
(require 'cl-lib)
(require 'pcase)
(require 'eieio-loaddefs)
(require 'eieio-loaddefs nil t)
;;;
;; A few functions that are better in the official EIEIO src, but

View File

@ -495,7 +495,7 @@ LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \
$(NOTIFY_LIBS) $(LIB_MATH) $(LIBZ) $(LIBMODULES) $(LIBSYSTEMD_LIBS)
$(leimdir)/leim-list.el: bootstrap-emacs$(EXEEXT)
$(MAKE) -C ../leim leim-list.el EMACS="$(bootstrap_exe)"
$(MAKE) -C ../leim all EMACS="$(bootstrap_exe)"
## FORCE it so that admin/unidata can decide whether these files
## are up-to-date. Although since charprop depends on bootstrap-emacs,