]> git.eshelyaron.com Git - emacs.git/commitdiff
make build system configurable again
authorAndrea Corallo <akrl@sdf.org>
Mon, 30 Dec 2019 23:37:47 +0000 (00:37 +0100)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:38:19 +0000 (11:38 +0100)
configure.ac
lisp/Makefile.in
src/Makefile.in

index 03570bd6c903c6c2c1834c06ff08320df65c7f86..2afa9572544cacc0c2b2d921a7fc19d10c5ac42b 100644 (file)
@@ -3760,10 +3760,10 @@ If you are sure you want Emacs compiled without elisp native compiler, pass
 to configure.])
   fi
 fi
+AC_SUBST(HAVE_NATIVE_COMP)
 AC_SUBST(LIBGCCJIT_LIB)
 AC_SUBST(COMP_OBJ)
 
-
 ### Use -lpng if available, unless '--with-png=no'.
 HAVE_PNG=no
 LIBPNG=
index 5bcb85ff1410d92feeaee2612b63af435ecb7fbe..cfc6f4949910017ee7d8b1dd7c8889cac1761334 100644 (file)
@@ -32,14 +32,15 @@ XARGS_LIMIT = @XARGS_LIMIT@
 # 'make' verbosity.
 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 "  ELC+ELN     " $@;
-am__v_ELN_1 =
+HAVE_NATIVE_COMP = @HAVE_NATIVE_COMP@
 
 AM_V_ELC = $(am__v_ELC_@AM_V@)
 am__v_ELC_ = $(am__v_ELC_@AM_DEFAULT_V@)
+ifeq ($(HAVE_NATIVE_COMP),yes)
 am__v_ELC_0 = @echo " ELC+ELN  " $@;
+else
+am__v_ELC_0 = @echo "  ELC     " $@;
+endif
 am__v_ELC_1 =
 
 AM_V_GEN = $(am__v_GEN_@AM_V@)
@@ -103,9 +104,11 @@ COMPILE_FIRST = \
        $(lisp)/emacs-lisp/macroexp.elc \
        $(lisp)/emacs-lisp/cconv.elc    \
        $(lisp)/emacs-lisp/byte-opt.elc \
-       $(lisp)/emacs-lisp/bytecomp.elc \
-       $(lisp)/emacs-lisp/autoload.elc \
-       $(lisp)/emacs-lisp/comp.elc
+       $(lisp)/emacs-lisp/bytecomp.elc
+ifeq ($(HAVE_NATIVE_COMP),yes)
+COMPILE_FIRST += $(lisp)/emacs-lisp/comp.elc
+endif
+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 \
@@ -280,19 +283,18 @@ 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_ELN)$(emacs) $(BYTE_COMPILE_FLAGS) \
+ifeq ($(HAVE_NATIVE_COMP),yes)
+       $(AM_V_ELC)$(emacs) $(BYTE_COMPILE_FLAGS) \
                -l comp -f byte-compile-refresh-preloaded \
                -f batch-byte-native-compile-for-bootstrap $(THEFILE)
+else
+       $(AM_V_ELC)$(emacs) $(BYTE_COMPILE_FLAGS) \
+               -l bytecomp -f byte-compile-refresh-preloaded \
+               -f batch-byte-compile $(THEFILE)
+endif
 
 # 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
@@ -305,12 +307,14 @@ $(THEFILE)c:
 
 # An old-fashioned suffix rule, which, according to the GNU Make manual,
 # cannot have prerequisites.
+ifeq ($(HAVE_NATIVE_COMP),yes)
 .el.elc:
        $(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 $<
+else
+.el.elc:
+       $(AM_V_ELC)$(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile $<
+endif
 
 .PHONY: compile-first compile-main compile compile-always
 
index cc43cd9f3191c331b6cf807d3d8e9434c4d2ca05..6a151d18d02ab99d293187fb44dfdad4149f4db0 100644 (file)
@@ -513,7 +513,6 @@ lisp.mk: $(lispsource)/loadup.el
          sed -e 's/$$/.elc \\/' -e 's/\.el\.elc/.el/'; \
        echo "" ) > $@
 
-
 -include lisp.mk
 shortlisp_filter = leim/leim-list.el site-load.elc site-init.elc
 shortlisp := $(filter-out ${shortlisp_filter},${shortlisp})