diff options
author | Björn Gustavsson <bjorn@erlang.org> | 2019-02-22 11:52:32 +0100 |
---|---|---|
committer | Björn Gustavsson <bjorn@erlang.org> | 2019-10-21 15:02:28 +0200 |
commit | c7372a889c186c6b60c54dfcb1a42b335abaa83d (patch) | |
tree | 8b59b98b5956601dd75a9a8d955eb755259c1182 /Makefile.in | |
parent | b6a0d41e45cef776a40b39f38e77863897486836 (diff) | |
download | erlang-c7372a889c186c6b60c54dfcb1a42b335abaa83d.tar.gz |
otp_build: Add -t option for building a tiny system
Add the `-t` option to `otp_build` for building a tiny system. The
tiny system can be used for updating the primary bootstrap or
the preloaded modules in erts.
On my computer, `./otp_build setup -t` finished the build of the
tiny system in 1 min 50 seconds. The small build (`-s` option or
no option) finished in 2 min 55 seconds.
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in index 12ae1d4a82..9c09ef18ed 100644 --- a/Makefile.in +++ b/Makefile.in @@ -377,10 +377,15 @@ endif # With all bootstraps we mean all bootstrapping that is done when # the system is delivered in open source, the primary # bootstrap is not included, it requires a pre built emulator... +ifeq ($(OTP_TINY_BUILD),true) +all_bootstraps: build_erl_interface emulator bootstrap_setup \ + tiny_secondary_bootstrap_build tiny_secondary_bootstrap_copy +else all_bootstraps: build_erl_interface emulator \ bootstrap_setup \ secondary_bootstrap_build secondary_bootstrap_copy \ tertiary_bootstrap_build tertiary_bootstrap_copy +endif .PHONY: build_erl_interface @@ -494,11 +499,17 @@ ifeq ($(OTP_SMALL_BUILD),true) ERL_TOP=$(ERL_TOP) PATH=$(BOOT_PREFIX)"$${PATH}" \ $(MAKE) $(TYPE) else +ifeq ($(OTP_TINY_BUILD),true) + $(make_verbose)cd lib && \ + ERL_TOP=$(ERL_TOP) PATH=$(BOOT_PREFIX)"$${PATH}" \ + $(MAKE) opt TINY_BUILD=true +else $(make_verbose)cd lib && \ ERL_TOP=$(ERL_TOP) PATH=$(BOOT_PREFIX)"$${PATH}" \ $(MAKE) $(TYPE) BUILD_ALL=true $(V_at)test -f $(ERL_TOP)/make/otp_built || echo "OTP built" > $(ERL_TOP)/make/otp_built endif +endif APPS=$(patsubst $(ERL_TOP)/lib/%/doc,%,$(wildcard $(ERL_TOP)/lib/*/doc)) @@ -573,11 +584,54 @@ bootstrap_setup_target: test $(TARGET) = `cat $(BOOTSTRAP_ROOT)/bootstrap/target`; } || \ echo $(TARGET) > $(BOOTSTRAP_ROOT)/bootstrap/target +tiny_secondary_bootstrap_build: + $(make_verbose)cd lib && \ + ERL_TOP=$(ERL_TOP) PATH=$(BOOT_PREFIX)"$${PATH}" \ + $(MAKE) opt SECONDARY_BOOTSTRAP=true TINY_BUILD=true + secondary_bootstrap_build: $(make_verbose)cd lib && \ ERL_TOP=$(ERL_TOP) PATH=$(BOOT_PREFIX)"$${PATH}" \ $(MAKE) opt SECONDARY_BOOTSTRAP=true +tiny_secondary_bootstrap_copy: + $(V_at)if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools ; fi + $(V_at)if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/ebin ; fi + $(V_at)if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/include ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/include ; fi + $(V_at)for x in lib/parsetools/ebin/*.beam; do \ + BN=`basename $$x`; \ + TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/ebin/$$BN; \ + test -f $$TF && \ + test '!' -z "`find $$x -newer $$TF -print`" && \ + cp $$x $$TF; \ + test '!' -f $$TF && \ + cp $$x $$TF; \ + true; \ + done + $(V_at)for x in lib/parsetools/include/*.hrl; do \ + BN=`basename $$x`; \ + TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/include/$$BN; \ + test -f $$TF && \ + test '!' -z "`find $$x -newer $$TF -print`" && \ + cp $$x $$TF; \ + test '!' -f $$TF && \ + cp $$x $$TF; \ + true; \ + done + $(V_at)if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/sasl ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/sasl ; fi + $(V_at)if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/sasl/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/sasl/ebin ; fi + $(V_at)if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/sasl/include ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/sasl/include ; fi + $(V_at)for x in lib/sasl/ebin/*.beam; do \ + BN=`basename $$x`; \ + TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/sasl/ebin/$$BN; \ + test -f $$TF && \ + test '!' -z "`find $$x -newer $$TF -print`" && \ + cp $$x $$TF; \ + test '!' -f $$TF && \ + cp $$x $$TF; \ + true; \ + done + secondary_bootstrap_copy: $(make_verbose) $(V_at)if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/hipe ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/hipe ; fi |