]> git.eshelyaron.com Git - emacs.git/commitdiff
rework build system for one pass
authorAndrea Corallo <akrl@sdf.org>
Sun, 29 Dec 2019 15:06:07 +0000 (16:06 +0100)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:38:18 +0000 (11:38 +0100)
lisp/Makefile.in
src/Makefile.in

index 91b44de46aa027953b75c9023371ec877d620847..5bcb85ff1410d92feeaee2612b63af435ecb7fbe 100644 (file)
@@ -34,12 +34,12 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 
 AM_V_ELN = $(am__v_ELN_@AM_V@)
 am__v_ELN_ = $(am__v_ELN_@AM_DEFAULT_V@)
-am__v_ELN_0 = @echo "  ELN     " $@;
+am__v_ELN_0 = @echo "  ELC+ELN     " $@;
 am__v_ELN_1 =
 
 AM_V_ELC = $(am__v_ELC_@AM_V@)
 am__v_ELC_ = $(am__v_ELC_@AM_DEFAULT_V@)
-am__v_ELC_0 = @echo "  ELC     " $@;
+am__v_ELC_0 = @echo " ELC+ELN  " $@;
 am__v_ELC_1 =
 
 AM_V_GEN = $(am__v_GEN_@AM_V@)
@@ -133,7 +133,7 @@ SUBDIRS_SUBDIRS = $(filter-out ${srcdir}/cedet% ${srcdir}/leim%,${SUBDIRS})
 
 # cus-load and finder-inf are not explicitly requested by anything, so
 # we add them here to make sure they get built.
-all: compile-main compile-native-main $(lisp)/cus-load.el $(lisp)/finder-inf.el
+all: compile-main $(lisp)/cus-load.el $(lisp)/finder-inf.el
 
 PHONY_EXTRAS =
 .PHONY: all custom-deps finder-data autoloads update-subdirs $(PHONY_EXTRAS)
@@ -280,19 +280,19 @@ TAGS: ${ETAGS} ${tagsfiles}
 # src/Makefile.in to rebuild a particular Lisp file, no questions asked.
 # Use byte-compile-refresh-preloaded to try and work around some of
 # the most common problems of not bootstrapping from a clean state.
+# THEFILE = no-such-file
+# .PHONY: $(THEFILE)c
+# $(THEFILE)c:
+#      $(AM_V_ELC)$(emacs) $(BYTE_COMPILE_FLAGS) \
+#              -l bytecomp -f byte-compile-refresh-preloaded \
+#              -f batch-byte-compile $(THEFILE)
+
 THEFILE = no-such-file
 .PHONY: $(THEFILE)c
 $(THEFILE)c:
-       $(AM_V_ELC)$(emacs) $(BYTE_COMPILE_FLAGS) \
-               -l bytecomp -f byte-compile-refresh-preloaded \
-               -f batch-byte-compile $(THEFILE)
-
-THEFILE = no-such-file
-.PHONY: $(THEFILE)n
-$(THEFILE)n:
        $(AM_V_ELN)$(emacs) $(BYTE_COMPILE_FLAGS) \
                -l comp -f byte-compile-refresh-preloaded \
-               -f batch-native-compile $(THEFILE)
+               -f batch-byte-native-compile-for-bootstrap $(THEFILE)
 
 # Files MUST be compiled one by one. If we compile several files in a
 # row (i.e., in the same instance of Emacs) we can't make sure that
@@ -306,7 +306,8 @@ $(THEFILE)n:
 # An old-fashioned suffix rule, which, according to the GNU Make manual,
 # cannot have prerequisites.
 .el.elc:
-       $(AM_V_ELC)$(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile $<
+       $(AM_V_ELC)$(emacs) $(BYTE_COMPILE_FLAGS) \
+       -l comp -f batch-byte-native-compile-for-bootstrap $<
 
 .el.eln:
        $(AM_V_ELN)$(emacs) $(BYTE_COMPILE_FLAGS) -f batch-native-compile $<
@@ -345,21 +346,6 @@ compile-main: gen-lisp compile-clean
          $(MAKE) compile-targets TARGETS="$$chunk"; \
        done
 
-# Obsiusly copy pasted from above. Just do it on elns + ignoring errors...
-compile-native-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 ${MAIN_FIRST} $$els; do            \
-         test -f $$el || continue;                  \
-         test ! -f $${el}c &&                       \
-             GREP_OPTIONS= grep '^;.*[^a-zA-Z]no-byte-compile: *t' $$el > /dev/null && \
-             continue;                              \
-         echo "$${el}n";                            \
-       done | xargs $(XARGS_LIMIT) echo) |          \
-       while read chunk; do                         \
-         $(MAKE) -i compile-targets TARGETS="$$chunk"; \
-       done
-
 .PHONY: compile-clean
 # Erase left-over .elc files that do not have a corresponding .el file.
 compile-clean:
@@ -394,8 +380,6 @@ semantic:
 # Calling make recursively because suffix rule cannot have prerequisites.
 compile: $(LOADDEFS) autoloads compile-first
        $(MAKE) compile-main
-# Ignore error for now cause we can't compile dynamic code
-       $(MAKE) -i compile-native-main
 
 # Compile all Lisp files.  This is like 'compile' but compiles files
 # unconditionally.  Some files don't actually get compiled because they
index faf248027917cbf9a91d610bad402eabdb7bcc8f..cc43cd9f3191c331b6cf807d3d8e9434c4d2ca05 100644 (file)
@@ -513,26 +513,15 @@ lisp.mk: $(lispsource)/loadup.el
          sed -e 's/$$/.elc \\/' -e 's/\.el\.elc/.el/'; \
        echo "" ) > $@
 
-shortnativelisp =
-native_lisp.mk: $(lispsource)/loadup.el
-       @rm -f $@
-       ${AM_V_GEN}( printf 'shortnativelisp = \\\n'; \
-       sed -n 's/^[ \t]*(load "\([^"]*\)".*/\1/p' $< | \
-         sed -e 's/$$/.eln \\/' -e 's/\.el\.eln/.el/'; \
-       echo "" ) > $@
 
 -include lisp.mk
--include native_lisp.mk
 shortlisp_filter = leim/leim-list.el site-load.elc site-init.elc
 shortlisp := $(filter-out ${shortlisp_filter},${shortlisp})
-shortnativelisp_filter = leim/leim-list.el site-load.eln site-init.eln
-shortnativelisp := $(filter-out ${shortnativelisp_filter},${shortnativelisp})
 ## Place loaddefs.el first, so it gets generated first, since it is on
 ## the critical path (relevant in parallel compilations).
 ## We don't really need to sort, but may as well use it to remove duplicates.
 shortlisp := loaddefs.el loadup.el $(sort ${shortlisp})
 lisp = $(addprefix ${lispsource}/,${shortlisp})
-nativelisp = $(addprefix ${lispsource}/,${shortnativelisp})
 
 ## Construct full set of libraries to be linked.
 LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \
@@ -583,7 +572,7 @@ ${lispintdir}/characters.elc: ${charscript:.el=.elc}
 ## since not all pieces are used on all platforms.  But DOC depends
 ## on all of $lisp, and emacs depends on DOC, so it is ok to use $lisp here.
 emacs$(EXEEXT): temacs$(EXEEXT) \
-                lisp.mk native_lisp.mk $(etc)/DOC $(lisp) $(nativelisp) \
+                lisp.mk $(etc)/DOC $(lisp) \
                 $(lispsource)/international/charprop.el ${charsets}
 ifeq ($(DUMPING),unexec)
        LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup --temacs=dump
@@ -733,7 +722,7 @@ bootstrap-clean: clean
        fi
 
 distclean: bootstrap-clean
-       rm -f Makefile lisp.mk native_lisp.mk
+       rm -f Makefile lisp.mk
        rm -fr $(DEPDIR)
 
 maintainer-clean: distclean
@@ -801,7 +790,7 @@ tags: TAGS ../lisp/TAGS $(lwlibdir)/TAGS
                THEFILE=$< $<c
 
 %.eln: %.el | bootstrap-emacs$(EXEEXT) $(bootstrap_pdmp)
-       @$(MAKE) -i $(AM_V_NO_PD) -C ../lisp EMACS="$(bootstrap_exe)"\
+       @$(MAKE)  $(AM_V_NO_PD) -C ../lisp EMACS="$(bootstrap_exe)"\
                THEFILE=$< $<n
 
 ## VCSWITNESS points to the file that holds info about the current checkout.