]> git.eshelyaron.com Git - emacs.git/commitdiff
Ensure that MAIN_FIRST have finished compilation before doing the rest
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 3 Dec 2021 21:21:41 +0000 (22:21 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 3 Dec 2021 21:22:31 +0000 (22:22 +0100)
* lisp/Makefile.in (main-first): Ensure that we're done with the
main bits before starting on the rest.
(GREP_OPTIONS): Depend on main-first.
(MAIN_FIRST): Compile cconv.el before c-by.el (bug#8764).

lisp/Makefile.in

index 4380a3bdb6e589c7366fb582de5105a20604facb..353c9e652c6b9c486655e357eb5adfde1015f247 100644 (file)
@@ -98,7 +98,7 @@ COMPILE_FIRST += $(lisp)/emacs-lisp/autoload.elc
 
 # Files to compile early in compile-main.  Works around bug#25556.
 MAIN_FIRST = ./emacs-lisp/eieio.el ./emacs-lisp/eieio-base.el \
-  ./cedet/semantic/db.el
+  ./cedet/semantic/db.el ./emacs-lisp/cconv.el
 
 # Prevent any settings in the user environment causing problems.
 unexport EMACSDATA EMACSDOC EMACSPATH
@@ -338,10 +338,10 @@ endif
 
 # Compile all the Elisp files that need it.  Beware: it approximates
 # 'no-byte-compile', so watch out for false-positives!
-compile-main: gen-lisp compile-clean
+compile-main: gen-lisp compile-clean main-first
        @(cd $(lisp) &&                              \
        els=`echo "${SUBDIRS_REL} " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.el |g'`; \
-       for el in ${MAIN_FIRST} $$els; do            \
+       for el in $$els; do            \
          test -f $$el || continue;                  \
          test ! -f $${el}c &&                       \
              GREP_OPTIONS= grep '^;.*[^a-zA-Z]no-byte-compile: *t' $$el > /dev/null && \
@@ -354,6 +354,18 @@ compile-main: gen-lisp compile-clean
                  TARGETS="$$chunk";                 \
        done
 
+# Compile some important files first.
+main-first:
+       @(cd $(lisp) &&                              \
+       for el in ${MAIN_FIRST}; do                  \
+         echo "$${el}c";                            \
+       done | xargs $(XARGS_LIMIT) echo) |          \
+       while read chunk; do                         \
+         $(MAKE) compile-targets                    \
+                 NATIVE_DISABLED=$(NATIVE_SKIP_NONDUMP) \
+                 TARGETS="$$chunk";                 \
+       done
+
 .PHONY: compile-clean
 # Erase left-over .elc files that do not have a corresponding .el file.
 compile-clean: