diff options
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 137 |
1 files changed, 55 insertions, 82 deletions
diff --git a/Makefile.in b/Makefile.in index 12e485754f..d758b47860 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 1998-2010. All Rights Reserved. +# Copyright Ericsson AB 1998-2011. All Rights Reserved. # # The contents of this file are subject to the Erlang Public License, # Version 1.1, (the "License"); you may not use this file except in @@ -28,10 +28,10 @@ SHELL = /bin/sh ERL_TOP = @ERL_TOP@ # OTP release -OTP = @OTP@ +OTP = OTP-@OTP_REL@ # erts (Erlang RunTime System) version -ERTS = @ERTS@ +ERTS = erts-@ERTS_VSN@ # ---------------------------------------------------------------------- @@ -119,7 +119,7 @@ BINDIR = $(DESTDIR)$(EXTRA_PREFIX)$(bindir) # # Erlang base public files # -ERL_BASE_PUB_FILES=erl erlc epmd run_erl to_erl dialyzer typer escript +ERL_BASE_PUB_FILES=erl erlc epmd run_erl to_erl dialyzer typer escript run_test # ERLANG_INST_LIBDIR is the top directory where the Erlang installation # will be located when running. @@ -349,21 +349,16 @@ endif all_bootstraps: emulator \ bootstrap_setup \ secondary_bootstrap_build secondary_bootstrap_copy \ - tertiary_bootstrap_build tertiary_bootstrap_copy \ - fourth_bootstrap_build fourth_bootstrap_copy + tertiary_bootstrap_build tertiary_bootstrap_copy # # Use these targets when you want to use the erl and erlc # binaries in your PATH instead of those created from the # pre-compiled Erlang modules under bootstrap/. # -ifeq ($(findstring ose,$(TARGET)),ose) -noboot: - $(MAKE) BOOT_PREFIX= emulator libs -else noboot: $(MAKE) BOOT_PREFIX= emulator libs local_setup -endif + noboot_install: $(MAKE) BOOT_PREFIX= install @@ -397,55 +392,28 @@ endif # --------------------------------------------------------------- # Target only used when building commercial ERTS patches # --------------------------------------------------------------- -release_docs docs: html_readmes +release_docs docs: mod2app ifeq ($(OTP_SMALL_BUILD),true) cd $(ERL_TOP)/lib && \ - ERL_TOP=$(ERL_TOP) $(MAKE) TESTROOT=$(RELEASE_ROOT) $@ + PATH=$(ERL_TOP)/bin:$${PATH} ERL_TOP=$(ERL_TOP) \ + $(MAKE) TESTROOT=$(RELEASE_ROOT) $@ else cd $(ERL_TOP)/lib && \ - ERL_TOP=$(ERL_TOP) $(MAKE) BUILD_ALL=1 TESTROOT=$(RELEASE_ROOT) $@ + PATH=$(ERL_TOP)/bin:$${PATH} ERL_TOP=$(ERL_TOP) \ + $(MAKE) BUILD_ALL=1 TESTROOT=$(RELEASE_ROOT) $@ cd $(ERL_TOP)/lib/dialyzer && \ - ERL_TOP=$(ERL_TOP) $(MAKE) BUILD_ALL=1 TESTROOT=$(RELEASE_ROOT) $@ + PATH=$(ERL_TOP)/bin:$${PATH} ERL_TOP=$(ERL_TOP) \ + $(MAKE) BUILD_ALL=1 TESTROOT=$(RELEASE_ROOT) $@ endif cd $(ERL_TOP)/erts && \ - ERL_TOP=$(ERL_TOP) $(MAKE) BUILD_ALL=1 TESTROOT=$(RELEASE_ROOT) $@ + PATH=$(ERL_TOP)/bin:$${PATH} ERL_TOP=$(ERL_TOP) \ + $(MAKE) BUILD_ALL=1 TESTROOT=$(RELEASE_ROOT) $@ cd $(ERL_TOP)/system/doc && \ + PATH=$(ERL_TOP)/bin:$${PATH} \ ERL_TOP=$(ERL_TOP) $(MAKE) TESTROOT=$(RELEASE_ROOT) $@ -.PHONY: html_readmes clean_html_readmes - -HTML_READMES = INSTALL.html INSTALL-WIN32.html INSTALL-CROSS.html - -html_readmes: $(HTML_READMES) - -clean_html_readmes: - rm -f $(HTML_READMES) - -%.html: %.md - echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">" > $@ - echo "<html xmlns:fn=\"http://www.w3.org/2005/02/xpath-functions\"><head>" >> $@ - echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">" >> $@ - echo "<style type=\"text/css\">" >> $@ - echo "body {" >> $@ - echo " margin: 4em 4em 4em 4em;" >> $@ - echo " background: white;" >> $@ - echo " font-family: Verdana, Arial, Helvetica, sans-serif;" >> $@ - echo "}" >> $@ - echo "code { font-family: courier;font-weight: normal}" >> $@ - echo "a:link { color: blue; text-decoration: none }" >> $@ - echo "a:active { color: blue; text-decoration: none }" >> $@ - echo "a:visited { color: blue; text-decoration: none }" >> $@ - echo "</style><title>" >> $@ - cat $< | sed -n "s/[ ]*\([^ ].*[^ ]\)[ ]*/\1/p;/[ ]*[^ ][ ]*/q" >> $@ - echo "</title></head><body>" >> $@ -ifneq ($(MD2HTML),) - $(MD2HTML) $< >> $@ -else - echo "<pre>" >> $@ - cat $< | sed "s|\&|\&\;|g;s|\"|\"\;|g;s|<|\<\;|g;s|>|\>\;|g" >> $@ - echo "</pre>" >> $@ -endif - echo "</body></html>" >> $@ +mod2app: + PATH=$(ERL_TOP)/bin:$${PATH} escript $(ERL_TOP)/lib/erl_docgen/priv/bin/xref_mod_app.escript -topdir $(ERL_TOP) -outfile $(ERL_TOP)/make/$(TARGET)/mod2app.xml # ---------------------------------------------------------------------- ERLANG_EARS=$(BOOTSTRAP_ROOT)/bootstrap/erts @@ -524,13 +492,16 @@ dep depend: # Creates "erl" and "erlc" in bootstrap/bin which uses the precompiled # libraries in the bootstrap directory +.PHONY: bootstrap_setup_target + # ---------------------------------------------------------------------- # Bootstraps... # ---------------------------------------------------------------------- ifeq ($(TARGET),win32) -bootstrap_setup: check_recreate_primary_bootstrap +bootstrap_setup: check_recreate_primary_bootstrap bootstrap_setup_target @rm -f $(BOOTSTRAP_ROOT)/bootstrap/bin/erl.exe \ $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc.exe \ + $(BOOTSTRAP_ROOT)/bootstrap/bin/escript.exe \ $(BOOTSTRAP_ROOT)/bootstrap/bin/erl.ini \ $(BOOTSTRAP_ROOT)/bootstrap/bin/beam.dll make_bootstrap_ini.sh $(BOOTSTRAP_ROOT)/bootstrap \ @@ -539,10 +510,12 @@ bootstrap_setup: check_recreate_primary_bootstrap $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc.exe @cp $(ERL_TOP)/bin/$(TARGET)/erl.exe \ $(BOOTSTRAP_ROOT)/bootstrap/bin/erl.exe + @cp $(ERL_TOP)/bin/$(TARGET)/escript.exe \ + $(BOOTSTRAP_ROOT)/bootstrap/bin/escript.exe else -bootstrap_setup: check_recreate_primary_bootstrap $(BOOTSTRAP_ROOT)/bootstrap/bin/erl $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc +bootstrap_setup: check_recreate_primary_bootstrap bootstrap_setup_target $(BOOTSTRAP_ROOT)/bootstrap/bin/erl $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc $(BOOTSTRAP_ROOT)/bootstrap/bin/escript -$(BOOTSTRAP_ROOT)/bootstrap/bin/erl: $(ERL_TOP)/erts/etc/unix/erl.src.src +$(BOOTSTRAP_ROOT)/bootstrap/bin/erl: $(ERL_TOP)/erts/etc/unix/erl.src.src $(BOOTSTRAP_ROOT)/bootstrap/target @rm -f $(BOOTSTRAP_ROOT)/bootstrap/bin/erl @sed -e "s;%FINAL_ROOTDIR%;$(BOOTSTRAP_ROOT)/bootstrap;" \ -e "s;\$$ROOTDIR/erts-.*/bin;$(ERL_TOP)/bin/$(TARGET);" \ @@ -551,12 +524,22 @@ $(BOOTSTRAP_ROOT)/bootstrap/bin/erl: $(ERL_TOP)/erts/etc/unix/erl.src.src $(BOOTSTRAP_ROOT)/bootstrap/bin/erl @chmod 755 $(BOOTSTRAP_ROOT)/bootstrap/bin/erl -$(BOOTSTRAP_ROOT)/bootstrap/bin/erlc: $(ERL_TOP)/bin/$(TARGET)/erlc +$(BOOTSTRAP_ROOT)/bootstrap/bin/erlc: $(ERL_TOP)/bin/$(TARGET)/erlc $(BOOTSTRAP_ROOT)/bootstrap/target @rm -f $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc @cp $(ERL_TOP)/bin/$(TARGET)/erlc $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc @chmod 755 $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc + +$(BOOTSTRAP_ROOT)/bootstrap/bin/escript: $(ERL_TOP)/bin/$(TARGET)/escript $(BOOTSTRAP_ROOT)/bootstrap/target + @rm -f $(BOOTSTRAP_ROOT)/bootstrap/bin/escript + @cp $(ERL_TOP)/bin/$(TARGET)/escript $(BOOTSTRAP_ROOT)/bootstrap/bin/escript + @chmod 755 $(BOOTSTRAP_ROOT)/bootstrap/bin/escript endif +bootstrap_setup_target: + @{ test -r $(BOOTSTRAP_ROOT)/bootstrap/target && \ + test $(TARGET) = `cat $(BOOTSTRAP_ROOT)/bootstrap/target`; } || \ + echo $(TARGET) > $(BOOTSTRAP_ROOT)/bootstrap/target + secondary_bootstrap_build: cd lib && \ ERL_TOP=$(ERL_TOP) PATH=$(BOOT_PREFIX)$${PATH} \ @@ -579,6 +562,8 @@ secondary_bootstrap_copy: if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools ; fi if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/ebin ; fi if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/include ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/include ; fi + if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/orber ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/orber ; fi + if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/orber/include ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/orber/include ; fi for x in lib/parsetools/ebin/*.beam; do \ BN=`basename $$x`; \ TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/ebin/$$BN; \ @@ -626,6 +611,16 @@ secondary_bootstrap_copy: true; \ done # cp -f lib/asn1/src/*.erl lib/asn1/src/*.hrl $(BOOTSTRAP_ROOT)/bootstrap/lib/asn1/src + for x in lib/orber/include/*.hrl; do \ + BN=`basename $$x`; \ + TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/orber/include/$$BN; \ + test -f $$TF && \ + test '!' -z "`find $$x -newer $$TF -print`" && \ + cp $$x $$TF; \ + test '!' -f $$TF && \ + cp $$x $$TF; \ + true; \ + done tertiary_bootstrap_build: cd lib && \ @@ -647,13 +642,6 @@ tertiary_bootstrap_copy: true; \ done # cp lib/snmp/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/snmp/ebin - -fourth_bootstrap_build: - cd lib && \ - ERL_TOP=$(ERL_TOP) PATH=$(BOOT_PREFIX)$${PATH} \ - $(MAKE) opt FOURTH_BOOTSTRAP=true - -fourth_bootstrap_copy: if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/sasl ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/sasl ; fi if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/sasl/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/sasl/ebin ; fi if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/sasl/include ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/sasl/include ; fi @@ -740,7 +728,6 @@ fourth_bootstrap_copy: cp $$x $$TF; \ true; \ done - # cp lib/syntax_tools/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/syntax_tools/ebin .PHONY: check_recreate_primary_bootstrap recreate_primary_bootstrap @@ -782,14 +769,16 @@ recreate_primary_bootstrap: # of the emulator possible .PHONY: primary_bootstrap \ - primary_bootstrap_check_make \ primary_bootstrap_build \ primary_bootstrap_compiler \ primary_bootstrap_mkdirs \ primary_bootstrap_copy -primary_bootstrap: primary_bootstrap_check_make +primary_bootstrap: @echo "=== Building a bootstrap compiler in $(BOOTSTRAP_ROOT)/bootstrap" + $(MAKE) BOOTSTRAP_ROOT=$(BOOTSTRAP_ROOT) \ + ERL_TOP=$(ERL_TOP) \ + bootstrap_clean cd $(ERL_TOP) && \ $(MAKE) TESTROOT=$(BOOTSTRAP_TOP) \ BOOTSTRAP_TOP=$(BOOTSTRAP_TOP) \ @@ -807,22 +796,6 @@ primary_bootstrap: primary_bootstrap_check_make $(BOOTSTRAP_TOP) \ $(BOOTSTRAP_ROOT) -# -# Dependencies are not complete in all makefiles; therefore, remove bootstrap -# build result and build from scratch if we are not using clearmake (which -# tracks dependencies itself). -# -primary_bootstrap_check_make: - @ case "$(MAKE)" in \ - *clearmake*) \ - ;; \ - *) \ - $(MAKE) BOOTSTRAP_ROOT=$(BOOTSTRAP_ROOT) \ - ERL_TOP=$(ERL_TOP) \ - bootstrap_clean \ - ;; \ - esac - primary_bootstrap_build: primary_bootstrap_mkdirs primary_bootstrap_compiler \ primary_bootstrap_stdlib cd lib && $(MAKE) ERLC_FLAGS='-pa $(BOOTSTRAP_COMPILER)/ebin' \ @@ -926,7 +899,6 @@ old_bootstrap_nc_for_ne_all_stages: cd lib && $(MAKE) BOOTSTRAP=1 TYPE=release release cd lib && $(MAKE) SECONDARY_BOOTSTRAP=1 TYPE=release release cd lib && $(MAKE) TERTIARY_BOOTSTRAP=1 TYPE=release release - cd lib && $(MAKE) FOURTH_BOOTSTRAP=1 TYPE=release release @@ -1032,7 +1004,7 @@ $(IBIN_DIR): # Clean targets # -clean: check_recreate_primary_bootstrap clean_html_readmes +clean: check_recreate_primary_bootstrap rm -f *~ *.bak config.log config.status prebuilt.files ibin/* find . -type f -name SKIP -print | xargs $(RM) cd erts && ERL_TOP=$(ERL_TOP) $(MAKE) clean @@ -1062,6 +1034,7 @@ bootstrap_root_clean: # $(BOOTSTRAP_TOP) for some reason should be empty). bootstrap_clean: rm -f $(ERL_TOP)/bootstrap/lib/*/ebin/*.beam + rm -f $(ERL_TOP)/bootstrap/lib/*/ebin/*.app rm -f $(ERL_TOP)/bootstrap/lib/*/egen/* rm -f $(ERL_TOP)/bootstrap/lib/*/include/*.hrl rm -f $(ERL_TOP)/bootstrap/primary_compiler/ebin/* |