Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

R13B01 has been imported

  • Loading branch information...
commit e1282325ed75e52a98d58f5bd9fb0fa27896173f 0 parents
Yurii Rashkovskii authored
Showing with 70,235 additions and 0 deletions.
  1. +13 −0 AUTHORS
  2. +286 −0 EPLICENCE
  3. +873 −0 Makefile.in
  4. +461 −0 README
  5. +690 −0 README.win32
  6. BIN  bootstrap/bin/start.boot
  7. +113 −0 bootstrap/bin/start.script
  8. BIN  bootstrap/bin/start_clean.boot
  9. +113 −0 bootstrap/bin/start_clean.script
  10. +3,861 −0 configure
  11. +268 −0 configure.in
  12. +138 −0 erts/AUTHORS
  13. +157 −0 erts/Makefile.in
  14. +931 −0 erts/aclocal.m4
  15. +1,519 −0 erts/autoconf/config.guess
  16. +1,630 −0 erts/autoconf/config.sub
  17. +147 −0 erts/autoconf/configure.vxworks
  18. +519 −0 erts/autoconf/install-sh
  19. +125 −0 erts/autoconf/vxworks/sed.general
  20. +42 −0 erts/autoconf/vxworks/sed.vxworks_cpu32
  21. +48 −0 erts/autoconf/vxworks/sed.vxworks_ppc32
  22. +48 −0 erts/autoconf/vxworks/sed.vxworks_ppc603
  23. +48 −0 erts/autoconf/vxworks/sed.vxworks_ppc603_nolongcall
  24. +47 −0 erts/autoconf/vxworks/sed.vxworks_ppc860
  25. +57 −0 erts/autoconf/vxworks/sed.vxworks_simlinux
  26. +62 −0 erts/autoconf/vxworks/sed.vxworks_simso
  27. +38 −0 erts/autoconf/vxworks/sed.vxworks_sparc
  28. +233 −0 erts/autoconf/win32.config.cache
  29. +679 −0 erts/config.h.in
  30. +23,259 −0 erts/configure
  31. +3,640 −0 erts/configure.in
  32. +36 −0 erts/doc/Makefile
  33. +194 −0 erts/doc/src/Makefile
  34. +444 −0 erts/doc/src/absform.xml
  35. +1,044 −0 erts/doc/src/alt_dist.xml
  36. +46 −0 erts/doc/src/book.xml
  37. +518 −0 erts/doc/src/crash_dump.xml
  38. +803 −0 erts/doc/src/driver.xml
  39. +497 −0 erts/doc/src/driver_entry.xml
  40. +120 −0 erts/doc/src/epmd.xml
  41. +908 −0 erts/doc/src/erl.xml
  42. +801 −0 erts/doc/src/erl_dist_protocol.xml
  43. +2,456 −0 erts/doc/src/erl_driver.xml
  44. +1,013 −0 erts/doc/src/erl_ext_dist.xml
  45. BIN  erts/doc/src/erl_ext_fig.gif
  46. +153 −0 erts/doc/src/erl_ext_fig.ps
  47. +104 −0 erts/doc/src/erl_fix_alloc.fig
  48. BIN  erts/doc/src/erl_fix_alloc.gif
  49. +646 −0 erts/doc/src/erl_fix_alloc.ps
  50. +250 −0 erts/doc/src/erl_prim_loader.xml
  51. +172 −0 erts/doc/src/erl_set_memory_block.xml
  52. +6,729 −0 erts/doc/src/erlang.xml
  53. +256 −0 erts/doc/src/erlc.xml
  54. +381 −0 erts/doc/src/erlsrv.xml
  55. +554 −0 erts/doc/src/erts_alloc.xml
  56. +203 −0 erts/doc/src/escript.xml
  57. +18 −0 erts/doc/src/fascicules.xml
  58. +282 −0 erts/doc/src/inet_cfg.xml
  59. +383 −0 erts/doc/src/init.xml
  60. +32 −0 erts/doc/src/make.dep
  61. +564 −0 erts/doc/src/match_spec.xml
  62. +4,874 −0 erts/doc/src/notes.xml
  63. +502 −0 erts/doc/src/notes_history.xml
  64. +44 −0 erts/doc/src/part.xml
  65. +37 −0 erts/doc/src/part_notes.xml
  66. +35 −0 erts/doc/src/part_notes_history.xml
  67. +59 −0 erts/doc/src/ref_man.xml
  68. +155 −0 erts/doc/src/run_erl.xml
  69. +64 −0 erts/doc/src/start.xml
  70. +126 −0 erts/doc/src/start_erl.xml
  71. +137 −0 erts/doc/src/tty.xml
  72. +88 −0 erts/doc/src/werl.xml
  73. +605 −0 erts/doc/src/zlib.xml
  74. +24 −0 erts/emulator/Makefile
  75. +1,091 −0 erts/emulator/Makefile.in
  76. +354 −0 erts/emulator/beam/atom.c
  77. +104 −0 erts/emulator/beam/atom.h
  78. +531 −0 erts/emulator/beam/atom.names
  79. +669 −0 erts/emulator/beam/beam_bif_load.c
  80. +785 −0 erts/emulator/beam/beam_bp.c
  81. +165 −0 erts/emulator/beam/beam_bp.h
  82. +102 −0 erts/emulator/beam/beam_catches.c
  83. +32 −0 erts/emulator/beam/beam_catches.h
Sorry, we could not display the entire diff because too many files (8,314) changed.
13 AUTHORS
@@ -0,0 +1,13 @@
+AUTHORS
+
+ Contributions - improvements, fixes, new features - from developers
+ make the Erlang 'Open Source' project a success. To give credit
+ where it's due, we've added a file called AUTHORS to each
+ application sub-directory with a list of everyone who has contributed
+ It might also contain the names of the original authors at Ericsson.
+
+ Speaking of original authors, we don't want to forget all the people
+ working full time with Erlang and OTP. So, thanks to everyone
+ working with Erlang at the OTP group, the Computer Science
+ Laboratory and the Software Architecture Laboratory.
+
286 EPLICENCE
@@ -0,0 +1,286 @@
+ERLANG PUBLIC LICENSE
+Version 1.1
+
+1. Definitions.
+
+1.1. ``Contributor'' means each entity that creates or contributes to
+the creation of Modifications.
+
+1.2. ``Contributor Version'' means the combination of the Original
+Code, prior Modifications used by a Contributor, and the Modifications
+made by that particular Contributor.
+
+1.3. ``Covered Code'' means the Original Code or Modifications or the
+combination of the Original Code and Modifications, in each case
+including portions thereof.
+
+1.4. ``Electronic Distribution Mechanism'' means a mechanism generally
+accepted in the software development community for the electronic
+transfer of data.
+
+1.5. ``Executable'' means Covered Code in any form other than Source
+Code.
+
+1.6. ``Initial Developer'' means the individual or entity identified
+as the Initial Developer in the Source Code notice required by Exhibit
+A.
+
+1.7. ``Larger Work'' means a work which combines Covered Code or
+portions thereof with code not governed by the terms of this License.
+
+1.8. ``License'' means this document.
+
+1.9. ``Modifications'' means any addition to or deletion from the
+substance or structure of either the Original Code or any previous
+Modifications. When Covered Code is released as a series of files, a
+Modification is:
+
+A. Any addition to or deletion from the contents of a file containing
+ Original Code or previous Modifications.
+
+B. Any new file that contains any part of the Original Code or
+ previous Modifications.
+
+1.10. ``Original Code'' means Source Code of computer software code
+which is described in the Source Code notice required by Exhibit A as
+Original Code, and which, at the time of its release under this
+License is not already Covered Code governed by this License.
+
+1.11. ``Source Code'' means the preferred form of the Covered Code for
+making modifications to it, including all modules it contains, plus
+any associated interface definition files, scripts used to control
+compilation and installation of an Executable, or a list of source
+code differential comparisons against either the Original Code or
+another well known, available Covered Code of the Contributor's
+choice. The Source Code can be in a compressed or archival form,
+provided the appropriate decompression or de-archiving software is
+widely available for no charge.
+
+1.12. ``You'' means an individual or a legal entity exercising rights
+under, and complying with all of the terms of, this License. For legal
+entities,``You'' includes any entity which controls, is controlled by,
+or is under common control with You. For purposes of this definition,
+``control'' means (a) the power, direct or indirect, to cause the
+direction or management of such entity, whether by contract or
+otherwise, or (b) ownership of fifty percent (50%) or more of the
+outstanding shares or beneficial ownership of such entity.
+
+2. Source Code License.
+
+2.1. The Initial Developer Grant.
+The Initial Developer hereby grants You a world-wide, royalty-free,
+non-exclusive license, subject to third party intellectual property
+claims:
+
+(a) to use, reproduce, modify, display, perform, sublicense and
+ distribute the Original Code (or portions thereof) with or without
+ Modifications, or as part of a Larger Work; and
+
+(b) under patents now or hereafter owned or controlled by Initial
+ Developer, to make, have made, use and sell (``Utilize'') the
+ Original Code (or portions thereof), but solely to the extent that
+ any such patent is reasonably necessary to enable You to Utilize
+ the Original Code (or portions thereof) and not to any greater
+ extent that may be necessary to Utilize further Modifications or
+ combinations.
+
+2.2. Contributor Grant.
+Each Contributor hereby grants You a world-wide, royalty-free,
+non-exclusive license, subject to third party intellectual property
+claims:
+
+(a) to use, reproduce, modify, display, perform, sublicense and
+ distribute the Modifications created by such Contributor (or
+ portions thereof) either on an unmodified basis, with other
+ Modifications, as Covered Code or as part of a Larger Work; and
+
+(b) under patents now or hereafter owned or controlled by Contributor,
+ to Utilize the Contributor Version (or portions thereof), but
+ solely to the extent that any such patent is reasonably necessary
+ to enable You to Utilize the Contributor Version (or portions
+ thereof), and not to any greater extent that may be necessary to
+ Utilize further Modifications or combinations.
+
+3. Distribution Obligations.
+
+3.1. Application of License.
+The Modifications which You contribute are governed by the terms of
+this License, including without limitation Section 2.2. The Source
+Code version of Covered Code may be distributed only under the terms
+of this License, and You must include a copy of this License with
+every copy of the Source Code You distribute. You may not offer or
+impose any terms on any Source Code version that alters or restricts
+the applicable version of this License or the recipients' rights
+hereunder. However, You may include an additional document offering
+the additional rights described in Section 3.5.
+
+3.2. Availability of Source Code.
+Any Modification which You contribute must be made available in Source
+Code form under the terms of this License either on the same media as
+an Executable version or via an accepted Electronic Distribution
+Mechanism to anyone to whom you made an Executable version available;
+and if made available via Electronic Distribution Mechanism, must
+remain available for at least twelve (12) months after the date it
+initially became available, or at least six (6) months after a
+subsequent version of that particular Modification has been made
+available to such recipients. You are responsible for ensuring that
+the Source Code version remains available even if the Electronic
+Distribution Mechanism is maintained by a third party.
+
+3.3. Description of Modifications.
+You must cause all Covered Code to which you contribute to contain a
+file documenting the changes You made to create that Covered Code and
+the date of any change. You must include a prominent statement that
+the Modification is derived, directly or indirectly, from Original
+Code provided by the Initial Developer and including the name of the
+Initial Developer in (a) the Source Code, and (b) in any notice in an
+Executable version or related documentation in which You describe the
+origin or ownership of the Covered Code.
+
+3.4. Intellectual Property Matters
+
+(a) Third Party Claims.
+ If You have knowledge that a party claims an intellectual property
+ right in particular functionality or code (or its utilization
+ under this License), you must include a text file with the source
+ code distribution titled ``LEGAL'' which describes the claim and
+ the party making the claim in sufficient detail that a recipient
+ will know whom to contact. If you obtain such knowledge after You
+ make Your Modification available as described in Section 3.2, You
+ shall promptly modify the LEGAL file in all copies You make
+ available thereafter and shall take other steps (such as notifying
+ appropriate mailing lists or newsgroups) reasonably calculated to
+ inform those who received the Covered Code that new knowledge has
+ been obtained.
+
+(b) Contributor APIs.
+ If Your Modification is an application programming interface and
+ You own or control patents which are reasonably necessary to
+ implement that API, you must also include this information in the
+ LEGAL file.
+
+3.5. Required Notices.
+You must duplicate the notice in Exhibit A in each file of the Source
+Code, and this License in any documentation for the Source Code, where
+You describe recipients' rights relating to Covered Code. If You
+created one or more Modification(s), You may add your name as a
+Contributor to the notice described in Exhibit A. If it is not
+possible to put such notice in a particular Source Code file due to
+its structure, then you must include such notice in a location (such
+as a relevant directory file) where a user would be likely to look for
+such a notice. You may choose to offer, and to charge a fee for,
+warranty, support, indemnity or liability obligations to one or more
+recipients of Covered Code. However, You may do so only on Your own
+behalf, and not on behalf of the Initial Developer or any
+Contributor. You must make it absolutely clear than any such warranty,
+support, indemnity or liability obligation is offered by You alone,
+and You hereby agree to indemnify the Initial Developer and every
+Contributor for any liability incurred by the Initial Developer or
+such Contributor as a result of warranty, support, indemnity or
+liability terms You offer.
+
+3.6. Distribution of Executable Versions.
+You may distribute Covered Code in Executable form only if the
+requirements of Section 3.1-3.5 have been met for that Covered Code,
+and if You include a notice stating that the Source Code version of
+the Covered Code is available under the terms of this License,
+including a description of how and where You have fulfilled the
+obligations of Section 3.2. The notice must be conspicuously included
+in any notice in an Executable version, related documentation or
+collateral in which You describe recipients' rights relating to the
+Covered Code. You may distribute the Executable version of Covered
+Code under a license of Your choice, which may contain terms different
+from this License, provided that You are in compliance with the terms
+of this License and that the license for the Executable version does
+not attempt to limit or alter the recipient's rights in the Source
+Code version from the rights set forth in this License. If You
+distribute the Executable version under a different license You must
+make it absolutely clear that any terms which differ from this License
+are offered by You alone, not by the Initial Developer or any
+Contributor. You hereby agree to indemnify the Initial Developer and
+every Contributor for any liability incurred by the Initial Developer
+or such Contributor as a result of any such terms You offer.
+
+3.7. Larger Works.
+You may create a Larger Work by combining Covered Code with other code
+not governed by the terms of this License and distribute the Larger
+Work as a single product. In such a case, You must make sure the
+requirements of this License are fulfilled for the Covered Code.
+
+4. Inability to Comply Due to Statute or Regulation.
+If it is impossible for You to comply with any of the terms of this
+License with respect to some or all of the Covered Code due to statute
+or regulation then You must: (a) comply with the terms of this License
+to the maximum extent possible; and (b) describe the limitations and
+the code they affect. Such description must be included in the LEGAL
+file described in Section 3.4 and must be included with all
+distributions of the Source Code. Except to the extent prohibited by
+statute or regulation, such description must be sufficiently detailed
+for a recipient of ordinary skill to be able to understand it.
+
+5. Application of this License.
+
+This License applies to code to which the Initial Developer has
+attached the notice in Exhibit A, and to related Covered Code.
+
+6. CONNECTION TO MOZILLA PUBLIC LICENSE
+
+This Erlang License is a derivative work of the Mozilla Public
+License, Version 1.0. It contains terms which differ from the Mozilla
+Public License, Version 1.0.
+
+7. DISCLAIMER OF WARRANTY.
+
+COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN ``AS IS'' BASIS,
+WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
+DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR
+NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF
+THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE
+IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER
+CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR
+CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART
+OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER
+EXCEPT UNDER THIS DISCLAIMER.
+
+8. TERMINATION.
+This License and the rights granted hereunder will terminate
+automatically if You fail to comply with terms herein and fail to cure
+such breach within 30 days of becoming aware of the breach. All
+sublicenses to the Covered Code which are properly granted shall
+survive any termination of this License. Provisions which, by their
+nature, must remain in effect beyond the termination of this License
+shall survive.
+
+9. DISCLAIMER OF LIABILITY
+Any utilization of Covered Code shall not cause the Initial Developer
+or any Contributor to be liable for any damages (neither direct nor
+indirect).
+
+10. MISCELLANEOUS
+This License represents the complete agreement concerning the subject
+matter hereof. If any provision is held to be unenforceable, such
+provision shall be reformed only to the extent necessary to make it
+enforceable. This License shall be construed by and in accordance with
+the substantive laws of Sweden. Any dispute, controversy or claim
+arising out of or relating to this License, or the breach, termination
+or invalidity thereof, shall be subject to the exclusive jurisdiction
+of Swedish courts, with the Stockholm City Court as the first
+instance.
+
+EXHIBIT A.
+
+``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
+compliance with the License. You should have received a copy of the
+Erlang Public License along with this software. If not, it can be
+retrieved via the world wide web at http://www.erlang.org/.
+
+Software distributed under the License is distributed on an "AS IS"
+basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+the License for the specific language governing rights and limitations
+under the License.
+
+The Initial Developer of the Original Code is Ericsson Utvecklings AB.
+Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
+AB. All Rights Reserved.''
873 Makefile.in
@@ -0,0 +1,873 @@
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 1998-2009. 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
+# compliance with the License. You should have received a copy of the
+# Erlang Public License along with this software. If not, it can be
+# retrieved online at http://www.erlang.org/.
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+# the License for the specific language governing rights and limitations
+# under the License.
+#
+# %CopyrightEnd%
+
+# Toplevel makefile for building the Erlang system
+#
+
+# ----------------------------------------------------------------------
+
+# And you'd think that this would be obvious... :-)
+SHELL = /bin/sh
+
+# The top directory in which Erlang is unpacked
+ERL_TOP = @ERL_TOP@
+
+# erts (Erlang RunTime System) version
+ERTS = @ERTS@
+
+# ----------------------------------------------------------------------
+
+#
+# The variables below control where Erlang is installed. They are
+# configurable (unless otherwise stated). Some of them are best
+# changed by giving special arguments to configure instead of changing
+# them in this file. Note: If you change them in Makefile, instead of
+# Makefile.in your changes will be lost the next time you run
+# configure.
+#
+
+# prefix from autoconf, default is /usr/local (must be an absolute path)
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+# The following can be set in case you install Erlang in a different
+# location from where you have configured it to run. This can be
+# useful e.g. when installing on a server that stores the files with a
+# different path from where the clients access them. Or when building
+# rpms.
+#INSTALL_PREFIX =
+# Naah...override `prefix' instead.
+
+# The directory in which user executables (ERL_BASE_PUB_FILES) are put
+BINDIR = $(INSTALL_PREFIX)@bindir@
+
+#
+# Erlang base public files
+#
+ERL_BASE_PUB_FILES=erl erlc epmd run_erl to_erl dialyzer typer escript
+
+# The directory which will contain installed Erlang version.
+# (ILIBDIR is supposed to be LIBDIR *without* the install prefix)
+ERLANG_LIBDIR = $(INSTALL_PREFIX)@libdir@/erlang
+ERLANG_ILIBDIR = @libdir@/erlang
+
+# You can *not* change these two, they have to stay this way for now.
+ERLANG_BINDIR = $(ERLANG_LIBDIR)/bin
+ERLANG_ERTSBINDIR = $(ERLANG_LIBDIR)/$(ERTS)/bin
+
+# The directory in which man pages for above executables are put
+ERL_MAN1DIR = $(INSTALL_PREFIX)@mandir@/man1
+ERL_MAN1EXT = 1
+
+# The directory in which Erlang private man pages are put. In order
+# not to clutter up the man namespace these are by default put in the
+# Erlang private directory $(ERLANG_ILIBDIR)/man. If you want to
+# install the man pages together with the rest give the argument
+# "--disable-erlang-mandir" when you run configure, which will set
+# MAN_DIR to @mandir@.
+# If you want a special suffix on the manpages set ERL_MANEXT to
+# this suffix, e.g. "erl"
+ERL_MANDIR = $(INSTALL_PREFIX)@erl_mandir@
+ERL_MANEXT =
+
+# ----------------------------------------------------------------------
+
+# Must be GNU make!
+MAKE = @MAKE_PROG@
+
+# This should be set to the target "arch-vendor-os"
+export TARGET = @TARGET@
+
+# A BSD compatible install program
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+MKSUBDIRS = ${INSTALL} -d
+
+# Program to create symbolic links
+LN_S = @LN_S@
+
+# Ranlib program, if not needed set to e.g. ":"
+RANLIB = @RANLIB@
+
+# ----------------------------------------------------------------------
+
+#
+# The directory where at least the primary bootstrap is placed under.
+#
+# We need to build to view private files in case we are in clearcase;
+# therefore, we don't want BOOTSTRAP_TOP changed.
+#
+# PRIMARY_BOOTSTRAP_TOP would perhaps have been a better name...
+#
+override BOOTSTRAP_TOP = $(ERL_TOP)/bootstrap
+# BOOTSTRAP_SRC_TOP is normally the same as BOOTSTRAP_TOP but
+# it is allowed to be changed
+BOOTSTRAP_SRC_TOP = $(BOOTSTRAP_TOP)
+
+# Where to install the bootstrap directory.
+#
+# Typically one might want to set this to a fast local filesystem, or,
+# the default, as ERL_TOP
+BOOTSTRAP_ROOT = $(ERL_TOP)
+
+# Directories which you need in the path if you wish to run the
+# locally built system. (This can be put in front or back of the path
+# depending on which system is preferred.)
+LOCAL_PATH = $(ERL_TOP)/erts/bin/$(TARGET):$(ERL_TOP)/erts/bin
+ifeq ($(TARGET),win32)
+WIN32_WRAPPER_PATH=$(ERL_TOP)/erts/etc/win32/cygwin_tools
+BOOT_PREFIX=$(WIN32_WRAPPER_PATH):$(BOOTSTRAP_ROOT)/bootstrap/bin:
+else
+BOOT_PREFIX=$(BOOTSTRAP_ROOT)/bootstrap/bin:
+endif
+# ----------------------------------------------------------------------
+# Fix up RELEASE_ROOT/TESTROOT havoc
+ifeq ($(RELEASE_ROOT),)
+ifneq ($(TESTROOT),)
+RELEASE_ROOT = $(TESTROOT)
+endif
+endif
+
+
+# ----------------------------------------------------------------------
+
+# A default for the release_tests, not same target dir as release.
+# More TESTROOT havoc...
+ifeq ($(TESTSUITE_ROOT),)
+ifneq ($(TESTROOT),)
+TESTSUITE_ROOT = $(TESTROOT)
+else
+TESTSUITE_ROOT = $(ERL_TOP)/release/tests
+endif
+endif
+
+#
+# The steps to build a working system are:
+# * build an emulator
+# * setup the erl and erlc program in bootstrap/bin
+# * build additional compilers and copy them into bootstrap/lib
+# * use the bootstrap erl and erlc to build all the libs
+#
+all: all_bootstraps \
+ libs local_setup dialyzer
+
+# 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...
+all_bootstraps: depend emulator \
+ bootstrap_setup \
+ secondary_bootstrap_build secondary_bootstrap_copy \
+ tertiary_bootstrap_build tertiary_bootstrap_copy \
+ fourth_bootstrap_build fourth_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
+
+.PHONY: release release_docs
+
+release:
+ifeq ($(OTP_SMALL_BUILD),true)
+ cd $(ERL_TOP)/lib && $(MAKE) TESTROOT=$(RELEASE_ROOT) release
+else
+ cd $(ERL_TOP)/lib && $(MAKE) BUILD_ALL=1 TESTROOT=$(RELEASE_ROOT) release
+ifneq ($(findstring vxworks,$(TARGET)),vxworks)
+ @if test -f lib/dialyzer/SKIP ; then \
+ echo "=== Skipping dialyzer, reason:" ; \
+ cat lib/dialyzer/SKIP ; \
+ echo "===" ; \
+ else \
+ cd $(ERL_TOP)/lib/dialyzer && \
+ $(MAKE) BUILD_ALL=1 TESTROOT=$(RELEASE_ROOT) release ; \
+ fi
+endif
+endif
+ cd $(ERL_TOP)/erts && $(MAKE) BUILD_ALL=1 TESTROOT=$(RELEASE_ROOT) release
+
+# ---------------------------------------------------------------
+# Target only used when building commercial ERTS patches
+# ---------------------------------------------------------------
+release_docs:
+ifeq ($(OTP_SMALL_BUILD),true)
+ cd $(ERL_TOP)/lib && $(MAKE) TESTROOT=$(RELEASE_ROOT) release_docs
+else
+ cd $(ERL_TOP)/lib && $(MAKE) BUILD_ALL=1 TESTROOT=$(RELEASE_ROOT) release_docs
+ cd $(ERL_TOP)/lib/dialyzer && $(MAKE) BUILD_ALL=1 TESTROOT=$(RELEASE_ROOT) release_docs
+endif
+ cd $(ERL_TOP)/erts && $(MAKE) BUILD_ALL=1 TESTROOT=$(RELEASE_ROOT) release_docs
+
+
+# ----------------------------------------------------------------------
+ERLANG_EARS=$(BOOTSTRAP_ROOT)/bootstrap/erts
+ELINK=$(BOOTSTRAP_ROOT)/bootstrap/erts/bin/elink
+BOOT_BINDIR=$(BOOTSTRAP_ROOT)/bootstrap/erts/bin
+BEAM_EVM=$(ERL_TOP)/bin/$(TARGET)/beam_evm
+BOOTSTRAP_COMPILER = $(BOOTSTRAP_TOP)/primary_compiler
+
+emulator:
+ cd erts && ERL_TOP=$(ERL_TOP) $(MAKE) NO_START_SCRIPTS=true $(TYPE) FLAVOR=$(FLAVOR)
+
+libs:
+ifeq ($(OTP_SMALL_BUILD),true)
+ cd lib && \
+ ERL_TOP=$(ERL_TOP) PATH=$(BOOT_PREFIX)$${PATH} \
+ $(MAKE) opt
+else
+ cd lib && \
+ ERL_TOP=$(ERL_TOP) PATH=$(BOOT_PREFIX)$${PATH} \
+ $(MAKE) opt BUILD_ALL=true
+endif
+kernel:
+ cd lib/kernel && \
+ ERL_TOP=$(ERL_TOP) PATH=$(BOOT_PREFIX)$${PATH} \
+ $(MAKE) opt BUILD_ALL=true
+
+stdlib:
+ cd lib/stdlib && \
+ ERL_TOP=$(ERL_TOP) PATH=$(BOOT_PREFIX)$${PATH} \
+ $(MAKE) opt BUILD_ALL=true
+
+compiler:
+ cd lib/compiler && \
+ ERL_TOP=$(ERL_TOP) PATH=$(BOOT_PREFIX)$${PATH} \
+ $(MAKE) opt BUILD_ALL=true
+
+hlib hipe:
+ cd lib/hipe && \
+ ERL_TOP=$(ERL_TOP) PATH=$(BOOT_PREFIX)$${PATH} \
+ $(MAKE) opt BUILD_ALL=true
+
+dialyzer:
+ifneq ($(OTP_SMALL_BUILD),true)
+ @if test -f lib/dialyzer/SKIP ; then \
+ echo "=== Skipping dialyzer, reason:" ; \
+ cat lib/dialyzer/SKIP ; \
+ echo "===" ; \
+ else \
+ cd lib/dialyzer && \
+ ERL_TOP=$(ERL_TOP) PATH=$(BOOT_PREFIX)$${PATH} \
+ $(MAKE) opt BUILD_ALL=true ; \
+ fi
+endif
+
+typer:
+ cd lib/typer && \
+ ERL_TOP=$(ERL_TOP) PATH=$(BOOT_PREFIX)$${PATH} \
+ $(MAKE) opt BUILD_ALL=true
+
+
+preloaded:
+ cd erts/preloaded/src && \
+ ERL_TOP=$(ERL_TOP) PATH=$(BOOT_PREFIX)$${PATH} \
+ $(MAKE) opt BUILD_ALL=true
+
+dep depend:
+ test X"$$ERTS_SKIP_DEPEND" = X"true" || (cd erts/emulator && ERL_TOP=$(ERL_TOP) $(MAKE) generate depend)
+ test X"$$ERTS_SKIP_DEPEND" = X"true" || (cd erts/lib_src && ERL_TOP=$(ERL_TOP) $(MAKE) depend)
+
+# Creates "erl" and "erlc" in bootstrap/bin which uses the precompiled
+# libraries in the bootstrap directory
+
+# ----------------------------------------------------------------------
+# Bootstraps...
+# ----------------------------------------------------------------------
+ifeq ($(TARGET),win32)
+bootstrap_setup: check_recreate_primary_bootstrap
+ @rm -f $(BOOTSTRAP_ROOT)/bootstrap/bin/erl.exe \
+ $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc.exe \
+ $(BOOTSTRAP_ROOT)/bootstrap/bin/erl.ini \
+ $(BOOTSTRAP_ROOT)/bootstrap/bin/beam.dll
+ make_bootstrap_ini.sh $(BOOTSTRAP_ROOT)/bootstrap \
+ $(ERL_TOP)/bin/$(TARGET)
+ @cp $(ERL_TOP)/bin/$(TARGET)/erlc.exe \
+ $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc.exe
+ @cp $(ERL_TOP)/bin/$(TARGET)/erl.exe \
+ $(BOOTSTRAP_ROOT)/bootstrap/bin/erl.exe
+else
+bootstrap_setup: check_recreate_primary_bootstrap $(BOOTSTRAP_ROOT)/bootstrap/bin/erl $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc
+
+$(BOOTSTRAP_ROOT)/bootstrap/bin/erl: $(ERL_TOP)/erts/etc/unix/erl.src.src
+ @rm -f $(BOOTSTRAP_ROOT)/bootstrap/bin/erl
+ @sed -e "s;%FINAL_ROOTDIR%;$(BOOTSTRAP_ROOT)/bootstrap;" \
+ -e "s;\$$ROOTDIR/erts-.*/bin;$(ERL_TOP)/bin/$(TARGET);" \
+ -e "s;EMU=.*;EMU=beam$(TYPEMARKER);" \
+ $(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
+ @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
+endif
+
+secondary_bootstrap_build:
+ cd lib && \
+ ERL_TOP=$(ERL_TOP) PATH=$(BOOT_PREFIX)$${PATH} \
+ $(MAKE) opt SECONDARY_BOOTSTRAP=true
+
+secondary_bootstrap_copy:
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/hipe ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/hipe ; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/hipe/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/hipe/ebin ; fi
+ for x in lib/hipe/ebin/*.beam; do \
+ BN=`basename $$x`; \
+ TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/hipe/ebin/$$BN; \
+ test -f $$TF && \
+ test '!' -z "`find $$x -newer $$TF -print`" && \
+ cp $$x $$TF; \
+ test '!' -f $$TF && \
+ cp $$x $$TF; \
+ true; \
+ done
+# if test -f lib/hipe/ebin/hipe.beam ; then cp lib/hipe/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/hipe/ebin; fi
+ 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
+ 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
+# cp lib/parsetools/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/ebin
+ 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
+# cp -f lib/parsetools/include/*.hrl $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/include
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/asn1 ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/asn1 ; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/asn1/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/asn1/ebin ; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/asn1/src ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/asn1/src ; fi
+ for x in lib/asn1/ebin/*.beam; do \
+ BN=`basename $$x`; \
+ TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/asn1/ebin/$$BN; \
+ test -f $$TF && \
+ test '!' -z "`find $$x -newer $$TF -print`" && \
+ cp $$x $$TF; \
+ test '!' -f $$TF && \
+ cp $$x $$TF; \
+ true; \
+ done
+# cp lib/asn1/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/asn1/ebin
+ for x in lib/asn1/src/*.[eh]rl; do \
+ BN=`basename $$x`; \
+ TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/asn1/src/$$BN; \
+ test -f $$TF && \
+ test '!' -z "`find $$x -newer $$TF -print`" && \
+ cp $$x $$TF; \
+ test '!' -f $$TF && \
+ cp $$x $$TF; \
+ true; \
+ done
+# cp -f lib/asn1/src/*.erl lib/asn1/src/*.hrl $(BOOTSTRAP_ROOT)/bootstrap/lib/asn1/src
+
+tertiary_bootstrap_build:
+ cd lib && \
+ ERL_TOP=$(ERL_TOP) PATH=$(BOOT_PREFIX)$${PATH} \
+ $(MAKE) opt TERTIARY_BOOTSTRAP=true
+
+tertiary_bootstrap_copy:
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/snmp ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/snmp ; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/snmp/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/snmp/ebin ; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/snmp/include ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/snmp/include ; fi
+ for x in lib/snmp/ebin/*.beam; do \
+ BN=`basename $$x`; \
+ TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/snmp/ebin/$$BN; \
+ test -f $$TF && \
+ test '!' -z "`find $$x -newer $$TF -print`" && \
+ cp $$x $$TF; \
+ test '!' -f $$TF && \
+ cp $$x $$TF; \
+ 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
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/ic ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/ic ; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/ic/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/ic/ebin ; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/ic/include ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/ic/include ; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/wx ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/wx ; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/wx/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/wx/ebin ; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/wx/include ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/wx/include ; fi
+ for x in lib/ic/ebin/*.beam; do \
+ BN=`basename $$x`; \
+ TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/ic/ebin/$$BN; \
+ test -f $$TF && \
+ test '!' -z "`find $$x -newer $$TF -print`" && \
+ cp $$x $$TF; \
+ test '!' -f $$TF && \
+ cp $$x $$TF; \
+ true; \
+ done
+# cp lib/ic/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/ic/ebin
+ for x in lib/ic/include/*.idl; do \
+ BN=`basename $$x`; \
+ TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/ic/include/$$BN; \
+ test -f $$TF && \
+ test '!' -z "`find $$x -newer $$TF -print`" && \
+ cp $$x $$TF; \
+ test '!' -f $$TF && \
+ cp $$x $$TF; \
+ true; \
+ done
+ for x in lib/ic/include/*.h; do \
+ BN=`basename $$x`; \
+ TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/ic/include/$$BN; \
+ test -f $$TF && \
+ test '!' -z "`find $$x -newer $$TF -print`" && \
+ cp $$x $$TF; \
+ test '!' -f $$TF && \
+ cp $$x $$TF; \
+ true; \
+ done
+# cp -f lib/ic/include/*.idl lib/ic/include/*.h $(BOOTSTRAP_ROOT)/bootstrap/lib/ic/include
+ 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
+# cp lib/sasl/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/sasl/ebin
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/syntax_tools ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/syntax_tools ; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/syntax_tools/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/syntax_tools/ebin ; fi
+ for x in lib/syntax_tools/ebin/*.beam; do \
+ BN=`basename $$x`; \
+ TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/syntax_tools/ebin/$$BN; \
+ test -f $$TF && \
+ test '!' -z "`find $$x -newer $$TF -print`" && \
+ cp $$x $$TF; \
+ test '!' -f $$TF && \
+ cp $$x $$TF; \
+ true; \
+ done
+ for x in lib/wx/include/*.hrl; do \
+ BN=`basename $$x`; \
+ TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/wx/include/$$BN; \
+ test -f $$TF && \
+ test '!' -z "`find $$x -newer $$TF -print`" && \
+ cp $$x $$TF; \
+ test '!' -f $$TF && \
+ 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
+
+
+#
+# If the source is a prebuilt delivery, no $(ERL_TOP)/bootstrap/lib
+# directory will exist. All applications part of the primary bootstrap
+# are delivered prebuilt though. If it is a prebuilt delivery we need
+# to recreate the primary bootstrap, from the prebuilt result.
+#
+# A prebuild delivery always contain a $(ERL_TOP)/prebuilt.files file.
+# If no such file exists, we wont try to recreate the primary bootstrap,
+# since it will just fail producing anything useful.
+#
+
+check_recreate_primary_bootstrap:
+ @if test -f $(ERL_TOP)/prebuilt.files ; then \
+ if test ! -d $(ERL_TOP)/bootstrap/lib ; then \
+ $(ERL_TOP)/otp_build save_bootstrap ; \
+ fi ; \
+ fi
+
+#
+# recreate_primary_bootstrap assumes that if $(ERL_TOP)/prebuilt.files
+# exist, all build results needed already exist in the application specific
+# directories of all applications part of the primary bootstrap.
+#
+recreate_primary_bootstrap:
+ $(ERL_TOP)/otp_build save_bootstrap
+
+# The first bootstrap build is rarely (never) used in open source, it's
+# used to build the shipped bootstrap directory. The Open source bootstrap
+# stages start with secondary bootstrap.
+#
+# These are the ones used, the other ones (prefixed with old_) are for BC.
+
+# These modules should stay in the kernel directory to make building
+# 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
+ @echo "=== Building a bootstrap compiler in $(BOOTSTRAP_ROOT)/bootstrap"
+ cd $(ERL_TOP) && \
+ $(MAKE) TESTROOT=$(BOOTSTRAP_TOP) \
+ BOOTSTRAP_TOP=$(BOOTSTRAP_TOP) \
+ primary_bootstrap_build
+ cd $(ERL_TOP) && \
+ $(MAKE) TESTROOT=$(BOOTSTRAP_TOP) \
+ BOOTSTRAP_TOP=$(BOOTSTRAP_TOP) \
+ primary_bootstrap_copy
+ cd $(ERL_TOP)/erts/start_scripts && \
+ $(MAKE) TESTROOT=$(BOOTSTRAP_TOP) \
+ BOOTSTRAP_TOP=$(BOOTSTRAP_TOP) bootstrap_scripts
+ test $(BOOTSTRAP_ROOT) = $(ERL_TOP) \
+ || $(ERL_TOP)/otp_build \
+ copy_primary_bootstrap \
+ $(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' \
+ BOOTSTRAP_TOP=$(BOOTSTRAP_TOP) \
+ BOOTSTRAP=1 opt
+
+primary_bootstrap_compiler:
+ cd lib/compiler && $(MAKE) \
+ BOOTSTRAP_TOP=$(BOOTSTRAP_TOP) \
+ BOOTSTRAP_COMPILER=$(BOOTSTRAP_COMPILER) \
+ BOOTSTRAP=1 \
+ opt
+
+primary_bootstrap_stdlib:
+ cd lib/stdlib/src && $(MAKE) \
+ BOOTSTRAP_COMPILER=$(BOOTSTRAP_COMPILER) \
+ primary_bootstrap_compiler
+
+primary_bootstrap_mkdirs:
+ test -d $(BOOTSTRAP_COMPILER)/egen \
+ || mkdir -p $(BOOTSTRAP_COMPILER)/egen
+ test -d $(BOOTSTRAP_COMPILER)/ebin \
+ || mkdir -p $(BOOTSTRAP_COMPILER)/ebin
+ test -d $(BOOTSTRAP_TOP)/lib/kernel/egen \
+ || mkdir -p $(BOOTSTRAP_TOP)/lib/kernel/egen
+ test -d $(BOOTSTRAP_TOP)/lib/kernel/ebin \
+ || mkdir -p $(BOOTSTRAP_TOP)/lib/kernel/ebin
+ test -d $(BOOTSTRAP_TOP)/lib/kernel/include \
+ || mkdir -p $(BOOTSTRAP_TOP)/lib/kernel/include
+ test -d $(BOOTSTRAP_TOP)/lib/stdlib/egen \
+ || mkdir -p $(BOOTSTRAP_TOP)/lib/stdlib/egen
+ test -d $(BOOTSTRAP_TOP)/lib/stdlib/ebin \
+ || mkdir -p $(BOOTSTRAP_TOP)/lib/stdlib/ebin
+ test -d $(BOOTSTRAP_TOP)/lib/stdlib/include \
+ || mkdir -p $(BOOTSTRAP_TOP)/lib/stdlib/include
+ test -d $(BOOTSTRAP_TOP)/lib/compiler/egen \
+ || mkdir -p $(BOOTSTRAP_TOP)/lib/compiler/egen
+ test -d $(BOOTSTRAP_TOP)/lib/compiler/ebin \
+ || mkdir -p $(BOOTSTRAP_TOP)/lib/compiler/ebin
+ test -d $(BOOTSTRAP_TOP)/lib/orber/include \
+ || mkdir -p $(BOOTSTRAP_TOP)/lib/orber/include
+
+primary_bootstrap_copy:
+ cp -f lib/kernel/include/*.hrl $(BOOTSTRAP_TOP)/lib/kernel/include
+ cp -f lib/stdlib/include/*.hrl $(BOOTSTRAP_TOP)/lib/stdlib/include
+ cp -f lib/orber/include/* $(BOOTSTRAP_TOP)/lib/orber/include
+
+# To remove modules left by the bootstrap building, but leave (restore)
+# the modules in kernel which are needed for an emulator build
+KERNEL_PRELOAD = otp_ring0 init erl_prim_loader prim_inet prim_file zlib prim_zip erlang
+KERNEL_PRELOAD_BEAMS=$(KERNEL_PRELOAD:%=$(BOOTSTRAP_TOP)/lib/kernel/ebin/%.beam)
+
+# Creates "erl" and "erlc" scripts in bin/erl which uses the libraries in lib
+local_setup:
+ @rm -f erts/bin/erl erts/bin/erlc erts/bin/cerl
+ @cd erts && \
+ ERL_TOP=$(ERL_TOP) PATH=$(BOOT_PREFIX)$${PATH} \
+ $(MAKE) local_setup
+
+
+
+# ----------------------------------------------------------------------
+# Build tests
+# ---------------------------------------------------------------------
+
+# Start with building the test server
+TESTS = test_server
+
+# Tests that can be run on any platform (keep alphabetic order, please)
+TESTS += \
+ asn1_test \
+ common_test_test \
+ compiler_test \
+ emulator_test \
+ epmd_test \
+ erl_interface_test \
+ ic_test \
+ inets_test \
+ inviso_test \
+ jinterface_test \
+ kernel_test \
+ megaco_test \
+ mnesia_test \
+ observer_test \
+ orber_test \
+ os_mon_test \
+ otp_mibs_test \
+ percept_test \
+ pman_test \
+ public_key_test \
+ reltool_test \
+ sasl_test \
+ snmp_test \
+ runtime_tools_test \
+ stdlib_test \
+ system_test \
+ test_server_test \
+ wx_test
+
+# Tests that can *not* be run on VxWorks
+ifneq ($(findstring vxworks,$(TARGET)),vxworks)
+TESTS += \
+ cosTransactions_test \
+ cosEvent_test \
+ cosTime_test \
+ cosNotification_test \
+ cosProperty_test \
+ cosFileTransfer_test \
+ cosEventDomain_test \
+ crypto_test \
+ debugger_test \
+ edoc_test \
+ eunit_test \
+ hipe_test \
+ odbc_test \
+ parsetools_test \
+ public_key_test \
+ ssl_test \
+ ssh_test \
+ syntax_tools_test \
+ tools_test \
+ toolbar_test \
+ xmerl_test
+endif
+
+.PHONY: tests release_tests test_server emulator_test system_test epmd_test
+
+tests release_tests: $(TESTS)
+
+# Build the test_server
+test_server:
+ cd lib/test_server && $(MAKE) TESTROOT=$(TESTSUITE_ROOT) release_tests
+
+emulator_test:
+ cd erts/emulator/test && $(MAKE) TESTROOT=$(TESTSUITE_ROOT) release_tests
+
+system_test:
+ cd erts/test && $(MAKE) TESTROOT=$(TESTSUITE_ROOT) release_tests
+
+epmd_test:
+ cd erts/epmd/test && $(MAKE) TESTROOT=$(TESTSUITE_ROOT) release_tests
+
+%_test:
+ @dir="`echo $@ | sed 's/_test$$//'`"; \
+ cd lib/$$dir/test && $(MAKE) TESTROOT=$(TESTSUITE_ROOT) release_tests
+# Should I also set TESTROOT_DIR=$(TESTSUITE_ROOT) ?
+# ----------------------------------------------------------------------
+
+# ----------------------------------------------------------------------
+# Obsolete type of bootstrap where all stages where built with installed sytem
+# shuld no longer be used and is soon to be removed.
+# Abbreviations: OC = Old Compiler, NC = New Compiler,
+# OE = Old Emulator, NE = New Emulator
+
+old_com_bootstrap: old_bootstrap_nc_for_ne_all_stages old_bootstrap_ne old_bootstrap_scripts
+
+#
+# Builds the New Compiler for the New Emulator (using existing erlc
+# and possibly new compiler) then copy everything to the release area.
+# Use to create the commerciall bootstrap version, which should be obsolete.
+#
+old_bootstrap_nc_for_ne_all_stages:
+ test -d $(TESTROOT) || mkdir -p $(TESTROOT)
+ 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
+
+
+
+old_bootstrap_ne:
+ cd erts && $(MAKE) release
+
+old_bootstrap_scripts:
+ cd erts/start_scripts && $(MAKE) release
+
+
+# This is one strange name for a target, this actually builds and strips only
+# the primary bootstrap, a minimal set of beam files to be able to continue
+# bootstrap builds. It's used by other makefiles, so I refrain from
+# changing the name right now...
+bootstrap_nc_for_ne_no_debug_sym:
+ test -d $(TESTROOT) || mkdir -p $(TESTROOT)
+ cd lib && $(MAKE) ERLC_FLAGS='-pa $(BOOTSTRAP_COMPILER)/ebin' \
+ BOOTSTRAP_TOP=$(BOOTSTRAP_TOP) BOOTSTRAP=1 TYPE=release release
+ $(ERL_TOP)/erts/emulator/utils/beam_strip $(TESTROOT)/lib/*/ebin/*.beam
+
+# ----------------------------------------------------------------------
+
+#
+# Install
+#
+# Order is important here, don't change it!
+#
+install: install.dirs install.emulator install.libs install.Install install.bin
+
+install.emulator:
+ cd erts && \
+ ERL_TOP=$(ERL_TOP) PATH=$(BOOT_PREFIX)$${PATH} \
+ $(MAKE) TESTROOT=$(ERLANG_LIBDIR) release
+
+install.libs:
+ifeq ($(OTP_SMALL_BUILD),true)
+ cd lib && \
+ ERL_TOP=$(ERL_TOP) PATH=$(BOOT_PREFIX)$${PATH} \
+ $(MAKE) TESTROOT=$(ERLANG_LIBDIR) release
+else
+ cd lib && \
+ ERL_TOP=$(ERL_TOP) PATH=$(BOOT_PREFIX)$${PATH} \
+ $(MAKE) TESTROOT=$(ERLANG_LIBDIR) BUILD_ALL=true release
+ @if test -f lib/dialyzer/SKIP ; then \
+ echo "=== Skipping dialyzer, reason:" ; \
+ cat lib/dialyzer/SKIP ; \
+ echo "===" ; \
+ else \
+ cd lib/dialyzer && \
+ ERL_TOP=$(ERL_TOP) PATH=$(BOOT_PREFIX)$${PATH} \
+ $(MAKE) TESTROOT=$(ERLANG_LIBDIR) BUILD_ALL=true release ; \
+ fi
+endif
+
+install.Install:
+ cd $(ERLANG_LIBDIR) && ./Install -minimal $(ERLANG_LIBDIR)
+
+#
+# Install erlang base public files
+#
+install.bin:
+ for file in $(ERL_BASE_PUB_FILES); do \
+ rm -f $(BINDIR)/$$file; \
+ ${LN_S} $(ERLANG_BINDIR)/$$file $(BINDIR)/$$file; \
+ done
+
+#
+# Directories needed before we can install
+#
+install.dirs:
+ test -d $(BINDIR) || ${MKSUBDIRS} $(BINDIR)
+ ${MKSUBDIRS} $(ERLANG_LIBDIR)
+ ${MKSUBDIRS} $(ERLANG_LIBDIR)/usr/lib
+
+# ----------------------------------------------------------------------
+
+.PHONY: clean eclean bootstrap_root_clean bootstrap_clean
+
+#
+# Clean targets
+#
+
+clean: check_recreate_primary_bootstrap
+ rm -f *~ *.bak config.log config.status prebuilt.files
+ find . -type f -name SKIP -print | xargs $(RM)
+ cd erts && ERL_TOP=$(ERL_TOP) $(MAKE) clean
+ cd lib && ERL_TOP=$(ERL_TOP) $(MAKE) clean BUILD_ALL=true
+ cd lib/dialyzer && ERL_TOP=$(ERL_TOP) $(MAKE) clean
+
+#
+# Just wipe out emulator, not libraries
+#
+
+eclean:
+ cd erts && ERL_TOP=$(ERL_TOP) $(MAKE) clean
+
+#
+# Clean up bootstrap
+#
+
+bootstrap_root_clean:
+ rm -f $(BOOTSTRAP_ROOT)/bootstrap/lib/*/ebin/*.beam
+ rm -f $(BOOTSTRAP_ROOT)/bootstrap/lib/*/include/*.hrl
+ rm -f $(BOOTSTRAP_ROOT)/bootstrap/bin/*.*
+
+# $(ERL_TOP)/bootstrap *should* equal $(BOOTSTRAP_TOP)
+#
+# We use $(ERL_TOP)/bootstrap instead of $(BOOTSTRAP_TOP) here as an
+# extra safety precaution (we would really make a mess if
+# $(BOOTSTRAP_TOP) for some reason should be empty).
+bootstrap_clean:
+ rm -f $(ERL_TOP)/bootstrap/lib/*/ebin/*.beam
+ rm -f $(ERL_TOP)/bootstrap/lib/*/egen/*
+ rm -f $(ERL_TOP)/bootstrap/lib/*/include/*.hrl
+ rm -f $(ERL_TOP)/bootstrap/primary_compiler/ebin/*
+ rm -f $(ERL_TOP)/bootstrap/primary_compiler/egen/*
+ rm -f $(ERL_TOP)/bootstrap/bin/*.*
+ rm -f $(KERNEL_PRELOAD:%=$(ERL_TOP)/lib/kernel/ebin/%.beam)
+ test $(BOOTSTRAP_ROOT) = $(ERL_TOP) \
+ || $(MAKE) BOOTSTRAP_ROOT=$(BOOTSTRAP_ROOT) bootstrap_root_clean
+
+# ----------------------------------------------------------------------
461 README
@@ -0,0 +1,461 @@
+===========================================================================
+ OpenSource Erlang/OTP
+===========================================================================
+
+
+Please read the whole file before attempting to build and install Erlang.
+You can find more information about OpenSource Erlang at
+
+ http://www.erlang.org/
+
+
+%CopyrightBegin%
+
+Copyright Ericsson AB 1998-2009. 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
+compliance with the License. You should have received a copy of the
+Erlang Public License along with this software. If not, it can be
+retrieved online at http://www.erlang.org/.
+
+Software distributed under the License is distributed on an "AS IS"
+basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+the License for the specific language governing rights and limitations
+under the License.
+
+%CopyrightEnd%
+
+
+Portability
+-----------
+
+Erlang/OTP should be possible to build from source on any Unix
+system, including Mac OS X.
+
+Instructions for building from source on Windows are in the file README.win32.
+Binary releases for Windows can be found at http://www.erlang.org/
+
+At Ericsson we have a "Daily Build and Test" that runs on:
+
+ Operating system Versions
+ -----------------------------------------------------------
+ Solaris/Sparc32 8, 9, 10
+ Solaris/Sparc64 10
+ Solaris/x86 10
+ Linux/Suse x86 9.4, 10.1
+ Linux/Suse x86_64 10.0, 10.1, 11.0
+ FreeBSD x86 7.1
+ Mac OS X/Intel 10.4.11 (Tiger), 10.5.6 (Leopard)
+ Windows XP SP3, 2003, Vista
+
+
+Versions known *not* to work
+-------------------------------------
+
+Suse linux 9.1 is shipped with a patched GCC version 3.3.3, having the
+rpm named gcc-3.3.3-41. That version has a serious optimization bug
+that makes it unusable for building the Erlang emulator. Please
+upgrade GCC to a newer version before building on Suse 9.1. Suse Linux
+EnterpriSe edition 9 (SLES9) has gcc-3.3.3-43 and is not affected.
+
+gcc-4.3.0 has a serious optimizer bug. It produces an Erlang emulator
+that will crash immediately. The bug is supposed to be fixed in gcc-4.3.1.
+
+FreeBSD had a bug which caused kqueue/poll/select to fail to detect
+that a writev() on a pipe has been made. This bug should have been fixed
+in FreeBSD 6.3 and FreeBSD 7.0. More information can be found at:
+* http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/sys_pipe.c
+* http://lists.freebsd.org/pipermail/freebsd-arch/2007-September/006790.html
+NetBSD and DragonFlyBSD probably have or have had the same bug.
+
+getcwd() on Solaris 9 can cause an emulator crash. If you have async-threads
+enabled you can increase the stack size of the async-threads as a temporary
+workaround. See the +a command-line argument in the documentation of erl(1).
+Without async-threads the emulator isn't as vulnerable to this bug, but if
+you hit it without async-threads the only workaround available is to enable
+async-threads and increase the stack size of the async-threads.
+Sun has however released patches that fixes the issue:
+Problem Description: 6448300 large mnttab can cause stack overrun during
+ Solaris 9 getcwd
+* http://sunsolve.sun.com/search/document.do?assetkey=1-21-112874-40-1&searchclause=6448300
+* http://sunsolve.sun.com/search/document.do?assetkey=1-21-114432-29-1&searchclause=6448300
+
+Required utilities
+------------------
+
+These are the tools you will need in order to unpack and build Erlang/OTP.
+
+ Unpacking
+ ---------
+
+ GNU unzip, or a modern uncompress.
+
+ A TAR program that understands the GNU TAR format for long
+ filenames (such as GNU TAR).
+
+
+ Compiling
+ ---------
+
+ GNU make
+
+ GNU C compiler
+
+ Perl 5
+
+ GNU m4 If hipe (native code) support is enabled.
+
+ ncurses (Or termcap or termlib.) The development headers and
+ libraries are needed, often known as ncurses-devel.
+ (Use --without-termcap to build without any of these
+ libraries. Only the old shell (without any line
+ editing) can be used.)
+
+ OpenSSL Optional, but needed for building the Erlang/OTP
+ applications 'ssl' and 'crypto'. You need the
+ "development package" of OpenSSL, i.e. including
+ the header files. For building the application 'ssl'
+ the OpenSSL binary command program 'openssl' is also
+ needed.
+
+ At least version 0.9.7 of OpenSSL is required.
+
+ Sun Java jdk-1.5.0 Or higher. Optional but needed for building
+ the Erlang/OTP application 'jinterface' and parts
+ of 'ic' and 'orber'. We have also tested
+ IBM's JDK 1.5.0.
+
+ X Windows Optional, but development headers and libraries
+ are needed to build the Erlang/OTP application 'gs'
+ on Unix/Linux.
+
+ sed There seem to be some problems with some of the
+ 'sed' version on Solaris. Make sure "/bin/sed"
+ or "/usr/bin/sed" is used on the Solaris platform.
+
+ Flex Optional, headers and libraries are needed to
+ build the flex scanner for the megaco application
+ on Unix/Linux.
+
+
+ Installing
+ ----------
+
+ An 'install' program that can take multiple file names.
+
+
+How to build and install Erlang/OTP
+-----------------------------------
+
+Start by unpacking the Erlang/OTP distribution file with your
+GNU compatible TAR
+
+ 1) gunzip -c otp_src_R13A.tar.gz | tar xf -
+ 1) zcat otp_src_R13A.tar.gz | tar xf -
+
+Now cd into the base directory
+
+ 2) cd otp_src_R13A
+
+On some platforms Perl may behave strangely if certain locales are set,
+so optionally you may need to set the LANG variable:
+
+ 3a) LANG=C; export LANG #Bourne shell
+or
+ 3b) setenv LANG C #C-shell
+
+Run the following commands
+
+ 4a) ./configure [ options ]
+or
+ 4b) ./configure --prefix=<BaseDir> [ other options ]
+
+By default, Erlang/OTP will be installed in /usr/local/{bin,lib/erlang,man/man1}.
+To instead install in <BaseDir>/{bin,lib/erlang,man/man1}, use the --prefix=<BaseDir>
+option.
+
+If you upgraded the source with some patch you may need to clean up
+from previous builds before the new build. Do a "make clean"; see
+"Caveats" below.
+
+ 5) make
+ 6) make install
+
+Let's go through them in some detail:
+
+Step 4 runs a configuration script created by the GNU autoconf
+utility, which checks for system specific features and then creates a
+number of makefiles.
+
+The configure script allows you to customize a number of parameters;
+type "./configure --help" for details.
+
+One of the things you can specify is where Erlang/OTP should be installed: by
+default Erlang/OTP will be installed in /usr/local/{bin,lib/erlang,man/man1};
+to keep the same structure but install in a different place, <Dir> say,
+use the --prefix argument like this:
+"./configure --prefix=<Dir>".
+
+This step will also configure any additional libraries unpacked in step 3
+(if you didn't add any of the extra libraries configure will issue a warning
+saying that there is no configuration information in lib; this warning can
+safely be ignored).
+
+You can also specify where the OpenSSL include and library files are
+located, or alternatively disable the use of SSL and Crypto.
+(The details can be found by typing './configure --help'.)
+
+Other options are:
+
+ --enable-smp-support See the next section.
+
+ --disable-smp-support See the next section.
+
+ --disable-threads Disable support for threaded I/O;
+ this option also disables building
+ of the SMP emulator. (See the next section.)
+
+ --enable-threads Enable support for threaded I/O.
+ (This is the default if SMP support is enabled.
+ See the next section.)
+
+ --disable-hipe Disable HiPE (High-Performance Erlang).
+ HiPE will automatically be enabled on
+ supported platforms.
+
+
+ Step 5 builds the Erlang/OTP system. On a fast computer,
+this will take about 5 minutes. After completion of this step,
+you should have a working Erlang/OTP system which you can
+try by typing "bin/erl". This should start up Erlang/OTP and give you
+a prompt.
+
+ Step 6 is optional. It installs Erlang/OTP (if you change your
+mind about where you wish to install you can rerun step 4, without
+having to do step 5 again).
+
+The source tree is delivered with a lot of platform independent
+build results already pre-built. If you want to remove these pre-built
+files, invoke './otp_build remove_prebuilt_files' from the $ERL_TOP
+directory. After you have done this, you can build exactly the same way
+as before, but the build process will take a much longer time.
+
+NOTE: Doing 'make clean' in an arbitrary directory of the source tree,
+may remove files needed for bootstrapping the build. Doing
+'./otp_build save_bootstrap' from the $ERL_TOP directory before
+doing 'make clean' will ensure that it will be possible to build after
+doing 'make clean'. './otp_build save_bootstrap' will be invoked
+automatically when 'make' is invoked from ERL_TOP with either the
+clean target, or the default target. It is also automatically invoked
+if './otp_build remove_prebuilt_files' is invoked.
+
+If you or your system has special requirements please read the
+Makefile for additional configuration information.
+
+Support for SMP (Symmetric Multi Processing)
+--------------------------------------------
+
+An emulator with SMP support will be built by default on most platforms
+if a usable POSIX thread library or native Windows threads is found.
+
+You can force building of an SMP emulator, by using
+"./configure --enable-smp-support". However, if configure doesn't
+automatically enable SMP support, the build is very likely to fail.
+
+Use "./configure --disable-smp-support" if you for some reason don't
+want to have the emulator with SMP support built.
+
+If SMP support is enabled, support for threaded I/O will also be turned on
+(also in the emulator without SMP support).
+
+The 'erl' command will automatically start the SMP emulator if the
+computer has more than one logical processor. You can force a start
+of the emulator with SMP support by passing '-smp enable' as
+command line arguments to erl, and you can force a start of the
+emulator without SMP support by passing '-smp disable'.
+
+How to install the Erlang/OTP documentation
+-------------------------------------------
+
+For some graphical tools to find the on-line help you have to install
+the HTML documentation on top of the installed OTP applications, i.e.
+
+ cd <PrefixDir>/lib/erlang
+ gunzip -c otp_html_R<XY>B-<Z>.tar.gz | tar xf -
+
+For "erl -man <page>" to work the Unix manual pages have to be
+installed in the same way, i.e.
+
+ cd <PrefixDir>/lib/erlang
+ gunzip -c otp_man_R<XY>B-<Z>.tar.gz | tar xf -
+
+
+GS (Graphic System)
+-------------------
+
+GS now Tcl/Tk 8.4. It will be searched for when starting GS.
+
+
+Using HiPE
+----------
+
+HiPE supports the following system configurations:
+
+x86:
+ All 32-bit and 64-bit mode processors should work.
+
+ The following systems are supported:
+
+ Linux:
+ Fedora Core is supported.
+ Both 32-bit and 64-bit modes are supported.
+
+ NPTL glibc is strongly preferred, or a LinuxThreads
+ glibc configured for "floating stacks". Old non-floating
+ stacks glibcs have a fundamental problem that makes HiPE
+ support and threads support mutually exclusive.
+ Solaris:
+ Solaris 10 (32-bit and 64-bit) and 9 (32-bit) are
+ supported.
+
+ The build requires a version of the GNU C compiler (gcc)
+ that has been configured to use the GNU assembler (gas).
+ Sun's x86 assembler is emphatically /not/ supported.
+ FreeBSD:
+ FreeBSD 6.1 and 6.2 in 32-bit and 64-bit modes should work.
+
+PowerPC:
+ All 32-bit 6xx/7xx(G3)/74xx(G4) processors should work.
+ 32-bit mode on 970 (G5) and POWER5 is untested and may need
+ compiler changes (to avoid using the "mcrxr" instruction).
+
+ Linux (Yellow Dog) and Mac OSX 10.3.9 are supported.
+
+SPARC:
+ All UltraSPARC processors running 32-bit user code should work.
+
+ Solaris 9 and Linux (Aurora) are supported.
+
+ On Solaris the build requires a gcc that has been configured
+ to use Sun's assembler and linker. Using the GNU assembler but
+ Sun's linker has been known to cause problems.
+ARM:
+ ARMv5TE (i.e. XScale) processors should work.
+ Both big-endian and little-endian modes are supported.
+
+ Linux is supported.
+
+HiPE is automatically enabled on the following systems:
+ x86 in 32-bit mode: Linux, Solaris, FreeBSD
+ x86 in 64-bit mode: Linux, Solaris, FreeBSD
+ PowerPC: Linux, MacOSX
+ SPARC: Linux
+ ARM: Linux
+On other supported systems you need to "./configure --enable-hipe".
+
+
+If you are running on a platform supporting HiPE and if
+you have not disabled HiPE, you can compile a module into
+native code like this from the Erlang shell:
+
+ c(Module, native).
+
+or
+
+ c(Module, [native|OtherOptions]).
+
+Using the erlc program, write like this:
+
+ erlc +native Module.erl
+
+The native code will be placed into the beam file and automatically
+loaded when the beam file is loaded.
+
+To add hipe options, write like this from the Erlang shell:
+
+ c(Module, [native,{hipe,HipeOptions}|MoreOptions]).
+
+Use
+
+ hipe:help_options().
+
+to print out the available options.
+
+
+Mac OS X (Darwin)
+-----------------
+
+We test Mac OS X 10.4.11 (Tiger) and Mac OS X 10.5.x (Leopard)
+in our daily builds (but only on Intel processors).
+
+Building on Mac OS X 10.3.x (Panther) might also work, but has
+not been tested by us.
+
+Make sure that the command "hostname" returns a valid fully qualified
+host name (this is configured in "/etc/hostconfig").
+
+If you develop linked-in drivers (shared library) you need to link
+using "gcc" and the flags "-bundle -flat_namespace -undefined
+suppress". You also include "-fno-common" in CFLAGS when
+compiling. Use ".so" as the library suffix.
+
+Universal 32bit binaries can be built on an Intel Mac using the
+--enable-darwin-universal configure option. There still may occur
+problems with certain applications using this option, but the base
+system should run smoothly.
+
+When building universal binaries on a PowerPC Mac (at least on Tiger),
+you must point out a suitable SDK that contains universal binaries.
+For instance, to build universal binaries for Tiger (10.4):
+
+CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk" LDFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk" ./configure --enable-darwin-universal
+
+Also, if you run Leopard, but want to build for Tiger, you must do
+
+export MACOSX_DEPLOYMENT_TARGET=10.4
+
+before running the above configure command.
+
+Experimental support for 64bit x86 darwin binaries can be enabled
+using the --enable-darwin-64bit configure flag. The 64bit binaries are
+best built and run on Leopard, but most of the system also works on
+Tiger (Tiger's 64bit libraries are, however, limited; therefore e.g. odbc,
+crypto, ssl etc. are not supported in Tiger). 64bit PPC binaries are not
+supported and we have no plans to add such support (no machines to
+test on).
+
+Universal binaries and 64bit binaries are mutually exclusive options.
+
+
+Make and the variable "ERL_TOP"
+-------------------------------
+
+All the makefiles in the entire directory tree use the environment
+variable ERL_TOP to find the absolute path of the installation. The
+configure script will figure this out and set it in the top level
+Makefile (which, when building, it will pass on). However, when
+developing it is sometimes convenient to be able to run make in a
+subdirectory. To do this you must set the ERL_TOP variable
+before you run make.
+
+For example, assume your GNU make program is called "make" and you
+want to rebuild the application STDLIB, then you could do:
+
+ cd lib/stdlib; env ERL_TOP=<Dir> make
+
+where <Dir> would be what you find ERL_TOP is set to in the top level
+Makefile.
+
+
+Authors
+-------
+Authors are mostly listed in the application's AUTHORS files,
+that is $ERL_TOP/lib/*/AUTHORS and $ERL_TOP/erts/AUTHORS,
+not in the individual source files.
+
+
+More Information
+----------------
+
+More information can be found at http://www.erlang.org.
690 README.win32
@@ -0,0 +1,690 @@
+How to build Erlang/OTP on Windows.
+-----------------------------------
+Table of contents
+
+1. Introduction
+2. Answers to some "frequently asked questions"
+3. What you need and the environment
+4. Building and installing
+5. Final words
+
+%CopyrightBegin%
+
+Copyright Ericsson AB 2003-2009. 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
+compliance with the License. You should have received a copy of the
+Erlang Public License along with this software. If not, it can be
+retrieved online at http://www.erlang.org/.
+
+Software distributed under the License is distributed on an "AS IS"
+basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+the License for the specific language governing rights and limitations
+under the License.
+
+%CopyrightEnd%
+
+
+
+Introduction
+------------
+
+This file describes how to build the Erlang emulator and the OTP
+libraries on Windows. The instructions apply to versions of Windows
+supporting the Cygwin emulated gnuish environment for Windows. We've
+built on the following platforms: Windows 2000 Professional, Windows
+2003 server, Windows XP Home/Professional, and Windows Vista. Any
+Windows95'ish platform will surely get you into trouble, what I'm not
+sure of, but it certainly will...
+
+The procedure described uses Cygwin as a build environment, you run
+the bash shell in Cygwin and uses gnu make/configure/autoconf etc to
+do the build. The emulator C-source code is, however, mostly compiled
+with Microsoft Visual C++(tm), producing a native Windows binary. This
+is the same procedure as we use to build the pre-built binaries. The
+fact that we use VC++ and not gcc is explained further in the FAQ
+section.
+
+I describe the build procedure to make it possible for open source
+customers to build the emulator, given that they have the needed
+tools. The binary Windows releases is still a preferred alternative if
+one does not have Microsoft's development tools and/or don't want to
+install Cygwin.
+
+To use Cygwin, one needs basic experience from a Unix environment, if
+one does not know how to set environment variables, run programs etc
+in a Unix environment, one will be quite lost in the Cygwin
+ditto. I can unfortunately not teach all the world how to use
+Cygwin and bash, neither how to install Cygwin nor perform basic tasks
+on a computer. Please refer to other documentation on the net for
+help, or use the binary release instead if you have problems using the
+tools.
+
+However, if you feel comfortable with the environment and build
+system, and have all the necessary tools, you have a great opportunity
+to make the Erlang/OTP distribution for Windows better. Please submit
+any suggestions and patches to the appropriate mailing lists (see
+http://www.erlang.org) to let them find their way into the next
+version of Erlang. If making changes to the build system (like
+makefiles etc) please bear in mind that the same makefiles are used on
+Unix/VxWorks/OSEDelta, so that your changes don't break other
+platforms. That of course goes for C-code too, system specific code
+resides in the $ERL_TOP/erts/emulator/sys/win32 and $ERL_TOP/erts/etc/win32
+directories mostly. The $ERL_TOP/erts/emulator/beam directory is for
+common code.
+
+Before the R9C release of Erlang/OTP, the Windows release was built
+partly on a Unix (Solaris) box and partly on a Windows box, using Perl
+hacks to communicate and sync between the two machines. R9C was the
+first release ever built solely on Windows, where no Unix machine is
+needed at all. Now we've used this build procedure for a couple of
+releases, and it has worked fine for us. Still, there might be all
+sorts of troubles on different machines and with different
+setups. I'll try to give hints wherever I've encountered difficulties,
+but please share your experiences by using the mailing list
+erlang_questions@erlang.org. I cannot of course help everyone with all
+their problems, please try to solve the problems and submit
+solutions/workarounds. Remember, it's all about sharing, not about
+demanding :-)
+
+Lets go then, I'll start with a little FAQ, based on in house questions
+and misunderstandings.
+
+
+Answers to "frequently asked questions"
+---------------------------------------
+
+Q: So, now I can build Erlang using GCC on Windows?
+
+A: No, unfortunately not. You'll need Microsoft's Visual C++ still, a
+Bourne-shell script (cc.sh) wraps the Visual C++ compiler and runs it
+from within the Cygwin environment. All other tools needed to build
+Erlang are free-ware/open source, but not the C compiler.
+
+Q: Why haven't you got rid of VC++ then, you ******
+
+A: Well, partly because it's a good compiler - really! Actually it's
+been possible in late R11-releases to build using mingw instead of
+visual C++ (you might see the remnants of that in some scripts and
+directories). Unfortunately the development of the SMP version for
+Windows broke the mingw build and we chose to focus on the VC++ build
+as the performance has been much better in the VC++ versions. The
+mingw build will be back, but as long as VC++ gives better
+performance, the commercial build will be a VC++ one.
+
+Q: OK, VC++ you need, but now you've started to demand a very recent
+(and expensive) version of Visual studio, not the old and stable VC++
+6.0 that was used in earlier versions. Why?
+
+A: The SMP version of Erlang needs features in the Visual Studio
+2005. Can't live without them. Besides the new compiler gives the
+Erlang emulator a ~40% performance boost(!)
+
+Q: Can/will I build a Cygwin binary with the procedure you describe?
+
+A: No, the result will be a pure Windows binary, and as far as I know,
+it's not possible to make a Cygwin binary yet. That is of course
+something desirable, but there are still some problems with the
+dynamic linking (dynamic Erlang driver loading) as well as the TCP/IP
+emulation in Cygwin, which, I'm sure of, will improve, but still has
+some problems. Fixing those problems might be easy or might be hard.
+I suggest you try yourself and share your experience. No one would be
+happier if a simple ./configure && make would produce a fully fledged
+Cygwin binary. Ericsson does however not pay me to... Well, you know
+that by now I suppose :-)
+
+Q: Hah, I saw you, you used GCC even though you said you didn't!
+
+A: OK, I admit, one of the files is compiled using Cygwin's GCC and
+the resulting object code is then converted to MS VC++ compatible coff
+using a small C hack. It's because that particular file, beam_emu.c
+benefits immensely from being able to use the GCC labels-as-values
+extension, which boosts emulator performance by up to 50%. That does
+unfortunately not (yet) mean that all of OTP could be compiled using
+GCC, that particular source code does not do anything system specific
+and actually is adopted to the fact that GCC is used to compile it on
+Windows.
+
+Q: So now there's a MS VC++ project file somewhere and I can build OTP
+using the nifty VC++ GUI!
+
+A: No, never. The hassle of keeping the project files up to date and
+do all the steps that constitute an OTP build from within the VC++ GUI
+is simply not worth it, maybe even impossible. A VC++ project
+file for Erlang/OTP will never happen, at least I will never make
+one. Clicking around in super-multi-tab'd dialogs to add a file or
+compiler option when it's so much easier in a makefile is simply not
+my style :-)
+
+Q: So how does it all work then?
+
+A: Cygwin is the environment, which closely resembles the environments
+found on any Unix machine. It's almost like you had a virtual Unix
+machine inside Windows. Configure, given certain parameters, then
+creates makefiles that are used by the Cygwin gnu-make to built the
+system. Most of the actual compilers etc are not, however, Cygwin
+tools, so I've written a couple of wrappers (Bourne-shell scripts),
+which reside in $ERL_TOP/etc/win32/cygwin_tools and they all do
+conversion of parameters and switches common in the Unix environment
+to fit the native Windows tools. Most notable is of course the paths,
+which in Cygwin are Unix-like paths with "forward slashes" (/) and no
+drive letters, the Cygwin specific command 'cygpath' is used for most
+of the path conversions. Luckily most compilers accept forward slashes
+instead of backslashes as path separators, one still have to get the
+drive letters etc right, though. The wrapper scripts are not general
+in the sense that, for example, cc.sh would understand and translates
+every possible gcc option and passes correct options to cl.exe. The
+principle is that the scripts are powerful enough to allow building of
+Erlang/OTP, no more, no less. They might need extensions to cope with
+changes during the development of Erlang, that's one of the reasons I
+made them into shell-scripts and not Perl-scripts, I believe they are
+easier to understand and change that way. I might be wrong though,
+cause another reason I didn't write them in Perl is because I've never
+liked Perl and my Perl code is no pleasant reading :-)
+
+In $ERL_TOP, there is a script called otp_build, that script handles
+the hassle of giving all the right parameters to configure/make and
+also helps you set up the correct environment variables to work with
+the Erlang source under Cygwin.
+
+Q: You use and need Cygwin, but then you haven't taken the time to
+port Erlang to the Cygwin environment but instead focus on your
+commercial release, is that really ethical?
+
+A: No, not really, but see this as a step in the right direction. I'm
+aiming at GCC compiled emulators and a Cygwin version, but I really
+need to do other things as well... In time, but don't hold your
+breath...
+
+Q: Can I build something that looks exactly as the commercial release.
+
+A: Yes, we use the exactly same build procedure.
+
+Q: Which version of Cygwin and other tools do you use then?
+
+A: For Cygwin we try to use the latest releases available when
+building. What versions you use shouldn't really matter, I try to
+include workarounds for the bugs I've found in different Cygwin
+releases, please help me to add workarounds for new Cygwin-related
+bugs as soon as you encounter them. Also please do submit bug reports
+to the appropriate Cygwin developers. The Cygwin GCC we used for R12B
+was version 3.4.4. We used VC++ 8.0 (i.e. Visual studio 2005 SP1),
+Sun's JDK 1.4.2_15, NSIS 2.30, and Win32 OpenSSL 0.9.8e. Please read
+the next section for details on what you need.
+
+Q: Can you help me setup X in Cygwin?
+
+A: No, unfortunately I haven't got time to help with Cygwin related
+user problems, please read Cygwin related web sites, newsgroups and
+mailing lists.
+
+Q: Why is the instruction so long? Is it really that complicated?
+
+A: Partly it's long because I babble too much, partly because I've
+described as much as I could about the installation of the needed
+tools. Once the tools are installed, building is quite easy. I also
+have tried to make this instruction understandable for people with
+limited Unix experience. Cygwin is a whole new environment to some
+Windows users, why careful explanation of environment variables etc
+seemed to be in place. The short story, for the experienced and
+impatient is:
+
+* Get and install complete Cygwin (latest)
+* (Buy and) Install Microsoft Visual studio 2005 and SP1 (or higher)
+* Get and install Sun's JDK 1.4.2
+* Get and install NSIS 2.01 or higher (up to 2.30 tried and working)
+* Get and install OpenSSL 0.9.7c or higher
+* Get and unpack wxWidgets-2.8.9 or higher to /opt/local/pgm inside cygwin
+ - open /cygwin/opt/local/pgm/wxWidgets-2.8.9/build/msw/wx.dsw
+ - enable wxUSE_GLCANVAS and wxUSE_POSTSCRIPT in include/wx/msw/setup.h
+ - build all unicode release (and unicode debug) packages
+ - open /cygwin/opt/local/pgm/wxWidgets-2.8.9/contrib/build/stc/stc.dsw
+ - build the unicode release (and unicode debug) packages
+* Get and unpack the erlang source distribution with Cygwin's tar.
+* Modify PATH and other environment variables so that all these tools
+are runnable from a bash shell
+* set ERL_TOP to where you unpacked the source distribution
+$ cd $ERL_TOP
+$ eval `./otp_build env_win32`
+$ ./otp_build configure
+$ ./otp_build boot -a
+$ ./otp_build release -a
+$ ./otp_build installer_win32
+$ release/win32/otp_win32_<OTP version> /S
+
+Voila! "Start->Programs->Erlang OTP <OTP version>->Erlang" starts the Erlang
+Windows shell.
+
+
+What you need and the environment
+---------------------------------
+
+You need some tools to be able to build Erlang/OTP on Windows. Most
+notably you'll need Cygwin and Microsoft VC++, but you also might want
+a Java compiler, the NSIS install system and OpenSSL. Only VC++ costs
+money, but then again it costs a lot of money, I know...
+Well' here's the list:
+
+* Cygwin, the very latest is usually best. Get all the development
+tools and of course all the basic ditto. In fact getting the complete
+package might be a good idea, as you'll start to love Cygwin after a
+while if you're accustomed to Unix. Make sure to get jar and also make
+sure *not* to install a Cygwin'ish Java... The Cygwin jar command is
+used but Sun's Java compiler and virtual machine...
+
+URL: http://www.cygwin.com
+
+- get the installer from the web site and use that to install
+Cygwin. Be sure to have fair privileges. If you're on a NT domain you
+should consider running "mkpasswd -d" and "mkgroup -d" after the
+installation to get the user databases correct. See their respective
+manual pages.
+
+When you start you first bash shell, you will get an awful prompt. You
+might also have a PATH environment variable that contains backslashes
+and such. Edit $HOME/.profile and $HOME/.bashrc to set fair prompts
+and set a correct PATH. Also do a "export SHELL" in .profile. For some
+non-obvious reason the environment variable $SHELL is not exported in
+bash. Also note that .profile is run at login time and .bashrc when
+sub shells are created. You'll need to explicitly source .bashrc from
+.profile if you want the commands there to be run at login time (like
+setting up aliases, shell functions and the like). I personally
+usually do like this at the end of .profile:
+------------------
+ENV=$HOME/.bashrc
+export ENV
+. $ENV
+----------------
+
+You might also, if you're a hard core type of person at least, want to
+setup X-windows (XFree86), that might be as easy as running startx
+from the command prompt and it might be much harder. Use Google to
+find help...
+
+If you don't use X-windows, you might want to setup the Windows
+console window by selecting properties in the console system menu
+(upper left corner of the window, the Cygwin icon in the title
+bar). Especially setting a larger screen buffer size (lines) is useful
+as it gets you a scrollbar so you can see whatever error messages
+that might appear...
+
+If you want to use (t)csh instead of bash you're on your own, I
+haven't tried (god forbid :-)) and know of no one that has. I expect
+that you use bash in all shell examples.
+
+* Microsoft Visual Studio 2005 SP1. Please don't skip the service
+pack! The installer might update your environment so that you can run
+the 'cl' command from the bash prompt, then again it might
+not... There is always a BAT file in VC\Bin under the installation
+directory (default C:\Program Files\Microsoft Visual Studio 8) called
+VCVARS32.BAT. Either add the environment settings in that file to the
+global environment settings in Windows or add the corresponding BASH
+environment settings to your .profile/.bashrc. For example, in my case
+I could add the following to .profile
+------------------------------------------------------------
+#Visual C++ Root directory as Cygwin style pathname
+VCROOT=/cygdrive/c/Program\ Files/Microsoft\ Visual\ Studio 8
+
+# Visual C++ Root directory as Windows style pathname
+WIN_VCROOT="C:\\Program Files\\Microsoft Visual Studio 8"
+
+# The PATH variable should be Cygwin'ish
+PATH=$VCROOT/Common7/IDE:$VCROOT/VC/BIN:$VCROOT/Common7/Tools:\
+$VCROOT/Common7/Tools/bin:$VCROOT/VC/PlatformSDK/bin:$VCROOT/SDK/v2.0/bin:\
+$VCROOT/VC/VCPackages:$PATH
+
+# Lib and INCLUDE should be Windows'ish
+# Note that semicolon (;) is used to separate Windows style paths but
+# colon (:) to separate Cygwin ditto!
+
+LIBPATH=$WIN_VCROOT\\VC\\ATLMFC\\LIB
+
+LIB=$WIN_VCROOT\\VC\\ATLMFC\\LIB\;$WIN_VCROOT\\VC\\LIB\;\
+$WIN_VCROOT\\VC\\PlatformSDK\\lib\;$WIN_VCROOT\\SDK\\v2.0\\lib
+
+INCLUDE=$WIN_VCROOT\\VC\\ATLMFC\\INCLUDE\;$WIN_VCROOT\\VC\\INCLUDE\;\
+$WIN_VCROOT\\VC\\PlatformSDK\\include
+
+export PATH LIB INCLUDE
+--------------------------------------------------------------
+
+Make a simple hello world and try to compile it with the 'cl' command
+from within bash. If that does not work, your environment needs
+fixing. Also remember to fix up the PATH environment, especially old
+Erlang installations might have inserted quoted paths that Cygwin does
+not understand. Remove or correct such paths. There should be no
+backslashes in your path environment variable in Cygwin bash, but LIB
+and INCLUDE should contain Windows style paths with semicolon,
+drive letters and backslashes.
+
+* Sun's Java JDK 1.5.0 or higher. Our Java code (jinterface, ic) is
+written for JDK 1.5.0. Get it for Windows and install it, the JRE is
+not enough. If you don't care about Java, you can skip this step, the
+result will be that jinterface is not built.
+
+URL: http://java.sun.com
+
+Add javac *LAST* to your path environment in bash, in my case this means:
+--------------------------------------------------------------
+PATH="$PATH:/cygdrive/c/Program Files/Java/jdk1.4.2/bin"
+--------------------------------------------------------------
+No CLASSPATH or anything is needed. Type "javac" at the bash prompt
+and you should get a list of available Java options. Make sure by
+typing "which java" that you use the Java you installed. Note however that
+Cygwin's jar.exe is used, that's why the JDK bin-directory should be
+added last in the PATH.
+
+* Nullsoft NSIS installer system. You need this to build the self
+installing package. It's a free open source installer that's much
+nicer to use than the commercial Wise and Install shield
+installers. This is the installer we use for commercial releases as
+well from R9C an on.
+URL: http://www.nullsoft.com/free/nsis
+Install the lot, especially the modern user interface components, as
+it's definitely needed. Put "makensis" in your path, in my case:
+--------------------------------------------------------------
+PATH=/cygdrive/c/Program\ Files/NSIS:$PATH
+--------------------------------------------------------------
+type makensis at the bash prompt and you should get a list of options
+if everything is OK.
+
+* OpenSSL for Windows. This is if you want the SSL and crypto
+applications to compile (and run). Go to http://www.openssl.org, click
+on the "Related" link and then on the "Binaries" link (upper right
+corner of the page last time I looked), you can then reach the
+"Shining Lights Productions" Web site for Windows binaries
+distributions. Get the latest or 0.9.7c if you get trouble with the
+latest. It's a nifty installer. The rest should be handled by
+configure, you needn't put anything in the path or anything.
+
+If you want to build openssl for windows yourself (which might be
+possible, as you wouldn't be reading this if you weren't a
+compile-it-yourself person :-), you either have to put the resulting
+DLL's in your path or in the windows system directory and either
+specify where you put the includes etc with the configure-parameter
+--with-ssl=<cygwin path to the root> or put your installation directly
+under c:\OpenSSL. The directory structure under the installation root
+for OpenSSL is expected to be one with subdirectories named "include",
+"bin" and "lib", possibly with a "VC" subdirectory of "lib" containing
+the actual .lib files. Note that the cygwin distributed OpenSSL cannot be
+used, it results in cygwin depending binaries and it has unix style
+archives (.a, not .lib).
+
+* The Erlang source distribution. The same as for Unix
+platforms. Preferably use tar from within Cygwin to unpack the source
+tar.gz (tar zxf otp_src_R11B-0.tar.gz).
+
+set the environment ERL_TOP to point to the root directory of the
+source distribution. Let's say I stood in $HOME/src and unpacked
+otp_src_R11B-0.tar.gz, I then add the following to .profile:
+--------------------------------------------------------
+ERL_TOP=$HOME/src/otp_src_R11B-0
+export $ERL_TOP
+--------------------------------------------------------
+
+So, if you have followed the instructions above, when you start a bash
+shell, you should have an INCLUDE environment with a Windows style
+path, a LIB environment variable also in Windows style, and finally a
+PATH that let's you reach cl, makensis, javac etc from the
+command prompt (use "which cl" etc to verify from bash).
+
+You should also have an ERL_TOP environment variable that is *Cygwin
+style*, and points to a directory containing, among other files, the
+script "otp_build".
+
+OK, a final massage of the environment is needed, and that is done by
+the script $ERL_TOP/otp_build. Start bash and do the following, note
+the "back-ticks" (`), can be quite hard to get on some keyboards, but
+pressing the back-tick key followed by the space bar might do it...
+
+------------------------
+$ cd $ERL_TOP
+$ eval `./otp_build env_win32`
+------------------------
+If you're unable to produce back-ticks on your keyboard, you can use
+the ksh variant:
+------------------------
+$ cd $ERL_TOP
+$ eval $(./otp_build env_win32)
+------------------------
+
+This should do the final touch to the environment and building should
+be easy after this. You could run "./otp_build env_win32" without
+"eval" just to see what it does, and to see that the environment it
+sets seems OK. The path is cleaned of spaces if possible (using DOS
+style short names instead), the variables OVERRIDE_TARGET, CC, CXX, AR
+and RANLIB are set to their respective wrappers and the directories
+$ERL_TOP/erts/etc/win32/cygwin_tools/vc and
+$ERL_TOP/erts/etc/win32/cygwin_tool are added first in the PATH.
+
+Try now a "which erlc". That should result in the erlc wrapper script
+(which does not have the .sh extension, for reasons best kept
+untold...). It should reside in $ERL_TOP/erts/etc/win32/cygwin_tools.
+You could also try "which cc.sh", which "ar.sh" etc.
+
+Now you're ready to build...
+
+
+Building and installing
+-----------------------
+Now it's assumed that you have executed "eval `./otp_build env_win32`"
+for this particular shell...
+
+Building is easiest using the otp_build script. That script takes care
+of running configure, bootstrapping etc on Windows in a simple
+way. The otp_build script is the utility we use ourselves to build on
+different platforms and it therefore contains code for all sorts of
+platforms. The principle is, however, that for non-Unix platforms, one
+uses "./otp_build env_<target>" to set up environment and then the
+script knows how to build on the platform "by itself". You've already
+run "./otp_build env_win32" in the step above, so now it's mostly like
+we build on any platform. OK, here are then steps; Assuming you will
+want to build a full installation executable with NSIS, you can omit
+<installation directory> and the release will be copied to
+$ERL_TOP/release/win32: and there is where the packed self installing
+executable will reside too.
+
+$ ./otp_build configure <optional configure options>
+$ ./otp_build boot -a
+$ ./otp_build release -a <installation directory>
+$ ./otp_build installer_win32 <installation directory> # optional
+
+Now you will have a file called otp_win32_R12B.exe in the <installation
+directory>, i.e. $ERL_TOP/release/win32.
+
+Lets get into more detail:
+
+$ ./otp_build configure - This runs the supplied configure scripts
+with options making configure behave nicely. The target machine type is
+plainly "win32", so a lot of the configure-scripts recognize this
+awkward target name and behave accordingly. The CC variable also makes
+the compiler be cc.sh, which wraps MSVC++, so all configure tests
+regarding the C compiler gets to run the right compiler. A lot of the
+tests are not needed on Windows, but I thought it best to run the
+whole configure anyway. The only configure option you might want to
+supply is --with-ssl, which might be needed if you have built your own
+openssl distribution. The Shining Lights distribution should be found
+automatically by configure, if that fails, add a --with-ssl=<dir> that
+specifies the root directory of your OpenSSL installation.
+
+$ ./otp_build boot -a - This uses the bootstrap directory (shipped
+with the source, $ERL_TOP/bootstrap) to build a complete OTP
+system. It first builds an emulator and sets up a minimal OTP system
+under $ERL_TOP/bootstrap, then starts to compile the different OTP
+compilers to make the $ERL_TOP/bootstrap system potent enough to be
+able to compile all Erlang code in OTP. Then, all Erlang and C code
+under $ERL_TOP/lib is built using the bootstrap system, giving a
+complete OTP system (although not installed). When this is done, one
+can run Erlang from within the source tree, just type $ERL_TOP/bin/erl
+and you should have a prompt. If you omit the -a flag, you'll get a
+smaller system, that might be useful during development. Now
+exit from Erlang and start making a release of the thing:
+
+$ ./otp_build release -a - Builds a commercial release tree from the
+source tree, default is to put it in $ERL_TOP/release/win32, you can
+give any directory as parameter (Cygwin style), but it doesn't really matter
+if you're going to build a self extracting installer too. You could of
+course build release to the final directory and then run ./Install.exe
+standing in the directory where the release was put, that will create
+a fully functional OTP installation. But let's make the nifty
+installer:
+
+$ ./otp_build installer_win32 - Create the self extracting installer
+executable. The executable otp_win32_<OTP version>.exe will be placed
+in the top directory of the release created in the previous step. If
+no release directory is specified, the release is expected to have
+been built to $ERL_TOP/release/win32, which also will be the place
+where the installer executable will be placed. If you specified some
+other directory for the release (i.e.
+./otp_build release -a /tmp/erl_release), you're expected to give the
+same parameter here, (i.e. ./otp_build installer_win32 /tmp/erl_release).
+You need to have a full NSIS installation and makensis.exe in your
+path for this to work of course. Once you have created the installer,
+you can run it to install Erlang/OTP in the regular way, just run the
+executable and follow the steps in the installation wizard. To get all
+default settings in the installation without any questions asked, you
+run the executable with the parameter "/S" (capital S). like in:
+------------------------------------------------------
+$ cd $ERL_TOP
+$ release/win32/otp_win32_R9C /S
+.....
+------------------------------------------------------
+- and after a while Erlang will have been installed in
+C:\Program Files\erl5.5, with shortcuts in the menu etc.
+
+*NOTE* Beginning with R9C, the Windows installer does *not* add Erlang
+to the system wide path. If one wants to have Erlang in the path, one
+has to add it by hand.
+
+The necessary setup of an Erlang installation is actually done by the
+program Install.exe, which resides in the release top. That program
+creates ".ini-files" and copies the correct boot scripts. If one has
+the correct directory tree (like after a ./otp_build release -a), only
+the running of Install.exe is necessary to get a fully functional
+OTP. What the self extracting installer adds is (of course) the
+possibility to distribute the binary easily, together with adding
+shortcuts to the Windows start menu. There is also some adding of
+entries in the registry, to associate .erl and .beam files with Erlang
+and get nifty icons, but that's not something you'll really need to
+run Erlang. The registry is also used to store uninstall information,
+but if one has not used the self extracting installer, one cannot
+(need not) do any uninstall, one just scratches the release directory
+and everything is gone. Erlang/OTP R9C does not *need* to put anything
+in the Windows registry at all, and does not if you don't use the self
+extracting installer. In other words the installer is pure cosmetics
+:-)
+
+
+Development
+-----------
+
+Once the system is built, you might want to change it. Having a test
+release in some nice directory might be useful, but you also can run
+Erlang from within the source tree. The target 'local_setup', makes
+the program $ERL_TOP/bin/erl.exe usable and it also uses all the OTP
+libraries in the source tree.
+
+If you hack the emulator, you can then build the emulator executable
+by standing in $ERL_TOP/erts/emulator and do a simple
+
+$ make opt
+
+Note that you need to have run (cd $ERL_TOP && eval `./otp_build env_win32`)
+in the particular shell before building anything on Windows. After
+doing a make opt you can test your result by running $ERL_TOP/bin/erl.
+If you want to copy the result to a release directory (say
+/tmp/erl_release), you do this (still in $ERL_TOP/erts/emulator)
+
+$ make TESTROOT=/tmp/erl_release release
+
+That will copy the emulator executables.
+
+To make a debug build of the emulator, you need to recompile both
+beam.dll (the actual runtime system) and erlexec.dll. Do like this
+
+$ cd $ERL_TOP
+$ rm bin/win32/erlexec.dll
+$ cd erts/emulator
+$ make debug
+$ cd ../etc
+$ make debug
+
+- and sometimes
+
+$ cd $ERL_TOP
+$ make local_setup
+
+So now when you run $ERL_TOP/erl.exe, you should have a debug compiled
+emulator, which you will see if you do a:
+
+1> erlang:system_info(system_version).
+
+- in the erlang shell. If the returned string contains "[debug]", you
+got a debug compiled emulator.
+
+To hack the erlang libraries, you simply do a "make opt" in the
+specific "applications" directory, like:
+
+$ cd $ERL_TOP/lib/stdlib
+$ make opt
+
+- or even in the source directory...
+
+$ cd $ERL_TOP/lib/stdlib/src
+$ make opt
+
+Note that you're expected o have a fresh erlang in your path when
+doing this, preferably the plain R12B you have built in the previous
+steps. You could also add $ERL_TOP/bootstrap/bin to your PATH before
+rebuilding specific libraries, that would give you a good enough
+Erlang system to compile any OTP erlang code.
+If you want to copy a library (an application) newly built, to a
+release area, you do like with the emulator:
+
+$ cd $ERL_TOP/lib/stdlib
+$ make TESTROOT=/tmp/erlang_release release
+
+Remember that:
+
+- Windows specific C-code goes in the
+$ERL_TOP/erts/emulator/sys/win32, $ERL_TOP/erts/emulator/drivers/win32
+or $ERL_TOP/erts/etc/win32.
+
+- Windows specific erlang code should be used conditionally and the
+host OS tested in *runtime*, the exactly same beam files should be
+distributed for every platform! So write code like:
+
+case os:type() of
+ {win32,_} ->
+ do_windows_specific();
+ Other ->
+ do_fallback_or_exit()
+end,
+
+That's basically all you need to get going.
+
+Final words
+-----------
+My hope is that the possibility to build the whole system on Windows
+will open up for free development on this platform too. There are many
+things one might want to do better in the Windows version, like the
+window-style command prompt as well as pure Cygwin porting. Although i
+realize it's a much larger step to start building on Windows (with all
+the software you need) than for instance on Linux, I sincerely hope
+that some of you will make the effort and start submitting Windows
+friendly patches.
+
+The first build system for Erlang using Cygwin on Windows was created
+by Per Bergkvist. I haven't used his build system, but it's rumored to
+be good. The idea to do this came from his work, so credit is well
+deserved.
+
+Of course this would have been completely impossible without the
+excellent Cygwin package. The guys at Cygnus solutions and Redhat
+deserves a huge THANKS! as well as all the other people in the free
+software community who have helped in creating the magnificent
+software that constitutes Cygwin.
+
+Good luck and Happy Hacking,
+Patrik, OTP
BIN  bootstrap/bin/start.boot
Binary file not shown
113 bootstrap/bin/start.script
@@ -0,0 +1,113 @@
+%% script generated at {2009,6,5} {14,13,4}
+{script,
+ {"OTP APN 181 01","R13B01"},
+ [{preLoaded,
+ [erl_prim_loader,erlang,init,otp_ring0,prim_file,prim_inet,prim_zip,
+ zlib]},
+ {progress,preloaded},
+ {path,["$ROOT/lib/kernel/ebin","$ROOT/lib/stdlib/ebin"]},
+ {primLoad,[error_handler]},
+ {kernel_load_completed},
+ {progress,kernel_load_completed},
+ {path,["$ROOT/lib/kernel/ebin"]},
+ {primLoad,
+ [application,application_controller,application_master,
+ application_starter,auth,code,code_server,disk_log,disk_log_1,
+ disk_log_server,disk_log_sup,dist_ac,dist_util,erl_boot_server,
+ erl_ddll,erl_distribution,erl_epmd,erl_reply,error_logger,
+ erts_debug,file,file_io_server,file_server,gen_sctp,gen_tcp,gen_udp,
+ global,global_group,global_search,group,heart,hipe_unified_loader,
+ inet,inet6_sctp,inet6_tcp,inet6_tcp_dist,inet6_udp,inet_config,
+ inet_db,inet_dns,inet_gethost_native,inet_hosts,inet_parse,inet_res,
+ inet_sctp,inet_tcp,inet_tcp_dist,inet_udp,kernel,kernel_config,net,
+ net_adm,net_kernel,os,packages,pg2,ram_file,rpc,seq_trace,
+ standard_error,user,user_drv,user_sup,wrap_log_reader]},
+ {path,["$ROOT/lib/stdlib/ebin"]},
+ {primLoad,
+ [array,base64,beam_lib,c,calendar,dets,dets_server,dets_sup,
+ dets_utils,dets_v8,dets_v9,dict,digraph,digraph_utils,edlin,
+ edlin_expand,epp,erl_bits,erl_compile,erl_eval,erl_expand_records,
+ erl_internal,erl_lint,erl_parse,erl_posix_msg,erl_pp,erl_scan,
+ erl_tar,error_logger_file_h,error_logger_tty_h,escript,ets,
+ eval_bits,file_sorter,filelib,filename,gb_sets,gb_trees,gen,
+ gen_event,gen_fsm,gen_server,io,io_lib,io_lib_format,io_lib_fread,
+ io_lib_pretty,lib,lists,log_mf_h,math,ms_transform,orddict,ordsets,
+ otp_internal,pg,pool,proc_lib,proplists,qlc,qlc_pt,queue,random,re,
+ regexp,sets,shell,shell_default,slave,sofs,string,supervisor,
+ supervisor_bridge,sys,timer,unicode,win32reg,zip]},
+ {progress,modules_loaded},
+ {path,["$ROOT/lib/kernel/ebin","$ROOT/lib/stdlib/ebin"]},
+ {kernelProcess,heart,{heart,start,[]}},
+ {kernelProcess,error_logger,{error_logger,start_link,[]}},
+ {kernelProcess,application_controller,
+ {application_controller,start,
+ [{application,kernel,
+ [{description,"ERTS CXC 138 10"},
+ {vsn,"2.13.2"},
+ {id,[]},
+ {modules,
+ [application,application_controller,application_master,
+ application_starter,auth,code,packages,code_server,
+ dist_util,erl_boot_server,erl_distribution,erl_reply,
+ error_handler,error_logger,file,file_server,
+ file_io_server,global,global_group,global_search,
+ group,heart,hipe_unified_loader,inet6_tcp,
+ inet6_tcp_dist,inet6_udp,inet6_sctp,inet_config,
+ inet_hosts,inet_gethost_native,inet_tcp_dist,kernel,
+ kernel_config,net,net_adm,net_kernel,os,ram_file,rpc,
+ user,user_drv,user_sup,disk_log,disk_log_1,
+ disk_log_server,disk_log_sup,dist_ac,erl_ddll,
+ erl_epmd,erts_debug,gen_tcp,gen_udp,gen_sctp,inet,
+ inet_db,inet_dns,inet_parse,inet_res,inet_tcp,
+ inet_udp,inet_sctp,pg2,seq_trace,standard_error,
+ wrap_log_reader]},
+ {registered,
+ [application_controller,erl_reply,auth,boot_server,
+ code_server,disk_log_server,disk_log_sup,
+ erl_prim_loader,error_logger,file_server_2,
+ fixtable_server,global_group,global_name_server,heart,
+ init,kernel_config,kernel_sup,net_kernel,net_sup,rex,
+ user,os_server,ddll_server,erl_epmd,inet_db,pg2]},
+ {applications,[]},
+ {included_applications,[]},
+ {env,[{error_logger,tty}]},
+ {start_phases,undefined},
+ {maxT,infinity},
+ {maxP,infinity},
+ {mod,{kernel,[]}}]}]}},
+ {progress,init_kernel_started},
+ {apply,
+ {application,load,
+ [{application,stdlib,
+ [{description,"ERTS CXC 138 10"},
+ {vsn,"1.16.2"},
+ {id,[]},
+ {modules,
+ [array,base64,beam_lib,c,calendar,dets,dets_server,
+ dets_sup,dets_utils,dets_v8,dets_v9,dict,digraph,
+ digraph_utils,edlin,edlin_expand,epp,eval_bits,
+ erl_bits,erl_compile,erl_eval,erl_expand_records,
+ erl_internal,erl_lint,erl_parse,erl_posix_msg,erl_pp,
+ erl_scan,erl_tar,error_logger_file_h,
+ error_logger_tty_h,escript,ets,file_sorter,filelib,
+ filename,gb_trees,gb_sets,gen,gen_event,gen_fsm,
+ gen_server,io,io_lib,io_lib_format,io_lib_fread,
+ io_lib_pretty,lib,lists,log_mf_h,math,ms_transform,
+ orddict,ordsets,otp_internal,pg,pool,proc_lib,
+ proplists,qlc,qlc_pt,queue,random,re,regexp,sets,
+ shell,shell_default,slave,sofs,string,supervisor,
+ supervisor_bridge,sys,timer,unicode,win32reg,zip]},
+ {registered,
+ [timer_server,rsh_starter,take_over_monitor,
+ pool_master,dets]},
+ {applications,[kernel]},
+ {included_applications,[]},
+ {env,[]},
+ {start_phases,undefined},
+ {maxT,infinity},
+ {maxP,infinity}]}]}},
+ {progress,applications_loaded},
+ {apply,{application,start_boot,[kernel,permanent]}},
+ {apply,{application,start_boot,[stdlib,permanent]}},
+ {apply,{c,erlangrc,[]}},
+ {progress,started}]}.
BIN  bootstrap/bin/start_clean.boot
Binary file not shown
113 bootstrap/bin/start_clean.script
@@ -0,0 +1,113 @@
+%% script generated at {2009,6,5} {14,13,4}
+{script,
+ {"OTP APN 181 01","R13B01"},
+ [{preLoaded,
+ [erl_prim_loader,erlang,init,otp_ring0,prim_file,prim_inet,prim_zip,
+ zlib]},
+ {progress,preloaded},
+ {path,["$ROOT/lib/kernel/ebin","$ROOT/lib/stdlib/ebin"]},
+ {primLoad,[error_handler]},
+ {kernel_load_completed},
+ {progress,kernel_load_completed},
+ {path,["$ROOT/lib/kernel/ebin"]},
+ {primLoad,
+ [application,application_controller,application_master,
+ application_starter,auth,code,code_server,disk_log,disk_log_1,
+ disk_log_server,disk_log_sup,dist_ac,dist_util,erl_boot_server,
+ erl_ddll,erl_distribution,erl_epmd,erl_reply,error_logger,
+ erts_debug,file,file_io_server,file_server,gen_sctp,gen_tcp,gen_udp,
+ global,global_group,global_search,group,heart,hipe_unified_loader,
+ inet,inet6_sctp,inet6_tcp,inet6_tcp_dist,inet6_udp,inet_config,
+ inet_db,inet_dns,inet_gethost_native,inet_hosts,inet_parse,inet_res,
+ inet_sctp,inet_tcp,inet_tcp_dist,inet_udp,kernel,kernel_config,net,
+ net_adm,net_kernel,os,packages,pg2,ram_file,rpc,seq_trace,
+ standard_error,user,user_drv,user_sup,wrap_log_reader]},
+ {path,["$ROOT/lib/stdlib/ebin"]},
+ {primLoad,
+ [array,base64,beam_lib,c,calendar,dets,dets_server,dets_sup,
+ dets_utils,dets_v8,dets_v9,dict,digraph,digraph_utils,edlin,
+ edlin_expand,epp,erl_bits,erl_compile,erl_eval,erl_expand_records,
+ erl_internal,erl_lint,erl_parse,erl_posix_msg,erl_pp,erl_scan,
+ erl_tar,error_logger_file_h,error_logger_tty_h,escript,ets,
+ eval_bits,file_sorter,filelib,filename,gb_sets,gb_trees,gen,
+ gen_event,gen_fsm,gen_server,io,io_lib,io_lib_format,io_lib_fread,
+ io_lib_pretty,lib,lists,log_mf_h,math,ms_transform,orddict,ordsets,
+ otp_internal,pg,pool,proc_lib,proplists,qlc,qlc_pt,queue,random,re,
+ regexp,sets,shell,shell_default,slave,sofs,string,supervisor,
+ supervisor_bridge,sys,timer,unicode,win32reg,zip]},
+ {progress,modules_loaded},
+ {path,["$ROOT/lib/kernel/ebin","$ROOT/lib/stdlib/ebin"]},
+ {kernelProcess,heart,{heart,start,[]}},
+ {kernelProcess,error_logger,{error_logger,start_link,[]}},
+ {kernelProcess,application_controller,
+ {application_controller,start,
+ [{application,kernel,
+ [{description,"ERTS CXC 138 10"},
+ {vsn,"2.13.2"},
+ {id,[]},
+ {modules,
+ [application,application_controller,application_master,
+ application_starter,auth,code,packages,code_server,
+ dist_util,erl_boot_server,erl_distribution,erl_reply,
+ error_handler,error_logger,file,file_server,
+ file_io_server,global,global_group,global_search,
+ group,heart,hipe_unified_loader,inet6_tcp,
+ inet6_tcp_dist,inet6_udp,inet6_sctp,inet_config,
+ inet_hosts,inet_gethost_native,inet_tcp_dist,kernel,
+ kernel_config,net,net_adm,net_kernel,os,ram_file,rpc,
+ user,user_drv,user_sup,disk_log,disk_log_1,
+ disk_log_server,disk_log_sup,dist_ac,erl_ddll,
+ erl_epmd,erts_debug,gen_tcp,gen_udp,gen_sctp,inet,
+ inet_db,inet_dns,inet_parse,inet_res,inet_tcp,
+ inet_udp,inet_sctp,pg2,seq_trace,standard_error,
+ wrap_log_reader]},
+ {registered,
+ [application_controller,erl_reply,auth,boot_server,
+ code_server,disk_log_server,disk_log_sup,
+ erl_prim_loader,error_logger,file_server_2,
+ fixtable_server,global_group,global_name_server,heart,
+ init,kernel_config,kernel_sup,net_kernel,net_sup,rex,
+ user,os_server,ddll_server,erl_epmd,inet_db,pg2]},
+ {applications,[]},
+ {included_applications,[]},
+ {env,[{error_logger,tty}]},
+ {start_phases,undefined},
+ {maxT,infinity},
+ {maxP,infinity},
+ {mod,{kernel,[]}}]}]}},
+ {progress,init_kernel_started},
+ {apply,
+ {application,load,
+ [{application,stdlib,
+ [{description,"ERTS CXC 138 10"},
+ {vsn,"1.16.2"},
+ {id,[]},
+ {modules,
+ [array,base64,beam_lib,c,calendar,dets,dets_server,
+ dets_sup,dets_utils,dets_v8,dets_v9,dict,digraph,
+ digraph_utils,edlin,edlin_expand,epp,eval_bits,
+ erl_bits,erl_compile,erl_eval,erl_expand_records,
+ erl_internal,erl_lint,erl_parse,erl_posix_msg,erl_pp,
+ erl_scan,erl_tar,error_logger_file_h,
+ error_logger_tty_h,escript,ets,file_sorter,filelib,
+ filename,gb_trees,gb_sets,gen,gen_event,gen_fsm,
+ gen_server,io,io_lib,io_lib_format,io_lib_fread,
+ io_lib_pretty,lib,lists,log_mf_h,math,ms_transform,
+ orddict,ordsets,otp_internal,pg,pool,proc_lib,
+ proplists,qlc,qlc_pt,queue,random,re,regexp,sets,
+ shell,shell_default,slave,sofs,string,supervisor,
+ supervisor_bridge,sys,timer,unicode,win32reg,zip]},
+ {registered,
+ [timer_server,rsh_starter,take_over_monitor,
+ pool_master,dets]},
+ {applications,[kernel]},
+ {included_applications,[]},
+ {env,[]},
+ {start_phases,undefined},
+ {maxT,infinity},
+ {maxP,infinity}]}]}},
+ {progress,applications_loaded},
+ {apply,{application,start_boot,[kernel,permanent]}},
+ {apply,{application,start_boot,[stdlib,permanent]}},
+ {apply,{c,erlangrc,[]}},
+ {progress,started}]}.
3,861 configure
3,861 additions, 0 deletions not shown
268 configure.in
@@ -0,0 +1,268 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_PREREQ(2.8)dnl
+
+AC_INIT()
+
+default_cache_file=./config.cache
+
+if test "x$no_recursion" != "xyes" -a "x$OVERRIDE_CONFIG_CACHE" = "x"; then
+ # The no_recursion variable is not documented, but the only
+ # action we take on it is disabling caching which is safe!
+ if test "x$cache_file" != "x$default_cache_file"; then
+ echo "Ignoring the --cache-file argument since it can cause the system to be erroneously configured"
+ fi
+ echo "Disabling caching"
+ if test -f $cache_file; then
+ echo "Removing cache file $cache_file"
+ rm -f $cache_file
+ fi
+ cache_file=/dev/null
+fi
+
+dnl How to set srcdir absolute is taken from the GNU Emacs distribution
+#### Make srcdir absolute, if it isn't already. It's important to
+#### avoid running the path through pwd unnecessary, since pwd can
+#### give you automounter prefixes, which can go away.
+case "${srcdir}" in
+ /* ) ;;
+ . )
+ ## We may be able to use the $PWD environment variable to make this
+ ## absolute. But sometimes PWD is inaccurate.
+ ## Make sure CDPATH doesn't affect cd (in case PWD is relative).
+ CDPATH=
+ if test "${PWD}" != "" && test "`(cd ${PWD} ; sh -c pwd)`" = "`pwd`" ;
+ then
+ srcdir="$PWD"
+ else
+ srcdir="`(cd ${srcdir}; pwd)`"
+ fi
+ ;;
+ * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
+esac
+
+#
+# Now srcdir is absolute and also the top of Erlang distribution, ERL_TOP.
+#
+ERL_TOP=${srcdir}
+AC_SUBST(ERL_TOP)
+
+dnl
+dnl Aux programs are found in erts/autoconf
+dnl
+AC_CONFIG_AUX_DIR(${srcdir}/erts/autoconf)
+
+dnl
+dnl Figure out what we are running on. And in violation of autoconf
+dnl style assume that $host is also what we are building for. I would
+dnl like to get cross compiling working, since we actually have
+dnl systems we cross compile for!
+dnl
+
+if test "X$host" != "Xfree_source" -a "X$host" != "Xwin32"; then
+ AC_CANONICAL_HOST
+fi
+
+TARGET=$host
+AC_SUBST(TARGET)
+
+
+dnl Checks for programs.
+
+AC_PROG_CC
+
+
+#
+# We need GNU make, complain if we can't find it
+#
+AC_MSG_CHECKING(for GNU make)
+# If there is a Makefile created we don't want make to start making, run
+# in a subdirectory and -f /dev/null
+MAKE_PROG=x
+if test X"$CLEARCASE_MAKE_COMPAT" = X"gnu" -a X"$CLEARCASE_ROOT" != X"" ; then
+ eval clearmake -version 2>&1 | grep clearmake > /dev/null 2>&1
+ case $? in
+ 0) MAKE_PROG="clearmake -V";;
+ *);;
+ esac
+fi
+if test X"$MAKE_PROG" = X"x"; then
+ mkdir conftestmake
+ if test -d conftestmake; then
+ cd conftestmake
+ for m in make gmake ggmake; do
+ eval $m --version -f /dev/null 2>&1 | grep GNU > /dev/null 2>&1
+ case $? in
+ 0) MAKE_PROG=$m ; break ;;
+ *) ;;
+ esac
+ done
+ cd ..
+ else
+ AC_MSG_ERROR(could not create subdirectory)
+ fi
+fi
+rm -rf conftestmake
+case $MAKE_PROG in
+ x) AC_MSG_RESULT(no)
+ AC_MSG_ERROR(GNU make is required!)
+ ;;
+ *) AC_MSG_RESULT(yes ($MAKE_PROG))
+ AC_SUBST(MAKE_PROG)
+ ;;
+esac
+
+AC_PROG_INSTALL
+if test X"${INSTALL}" = "X${ac_aux_dir}/install-sh -c" && test -f /usr/ucb/install ; then
+ case $host_os in
+ osf*) ;;
+ *) INSTALL="/usr/ucb/install -c" ;;
+ esac
+fi
+
+AC_PROG_LN_S
+AC_PROG_RANLIB
+
+#
+# Get erts version from erts/vsn.mk
+#
+[ERTS=erts-`sed -n 's/^VSN[ ]*=[ ]*\([0-9.]\)/\1/p' < erts/vsn.mk`]
+AC_SUBST(ERTS)
+
+
+AC_ARG_ENABLE(threads,
+[ --enable-threads enable async thread support
+ --disable-threads disable async thread support])
+
+AC_ARG_ENABLE(smp-support,
+[ --enable-smp-support enable smp support
+ --disable-smp-support disable smp support])
+
+AC_ARG_WITH(termcap,
+[ --with-termcap use termcap (default)
+ --without-termcap do not use any termcap libraries (ncurses,curses,termcap,termlib)])
+
+AC_ARG_ENABLE(kernel-poll,
+[ --enable-kernel-poll enable kernel poll support])
+
+AC_ARG_ENABLE(hipe,
+[ --enable-hipe enable hipe support
+ --disable-hipe disable hipe support])
+
+AC_ARG_ENABLE(megaco_flex_scanner_lineno,
+[ --enable-megaco-flex-scanner-lineno enable megaco flex scanner lineno
+ --disable-megaco-flex-scanner-lineno disable megaco flex scanner lineno])
+
+AC_ARG_ENABLE(megaco_reentrant_flex_scanner,
+[ --enable-megaco-reentrant-flex-scanner enable reentrans megaco flex scanner
+ --disable-megaco-reentrant-flex-scanner disable reentrans megaco flex scanner])
+
+AC_ARG_WITH(ssl,
+[ --with-ssl=PATH specify location of OpenSSL include and lib
+ --with-ssl use SSL (default)
+ --without-ssl don't use SSL])
+
+AC_ARG_ENABLE(dynamic-ssl-lib,
+[ --enable-dynamic-ssl-lib force using dynamic openssl libraries
+ --disable-dynamic-ssl-lib disable using dynamic openssl libraries])
+
+#
+# Set Erlang man page directory
+#
+AC_ARG_ENABLE(erlang-mandir,
+[ --disable-erlang-mandir do not install Erlang man pages in a private directory],
+[ case "$enableval" in
+ no) erl_mandir=$mandir ;;
+ *) erl_mandir='$(ERLANG_ILIBDIR)/man' ;;
+ esac ], erl_mandir='$(ERLANG_ILIBDIR)/man')
+AC_SUBST(erl_mandir)
+
+AC_ARG_ENABLE(darwin-universal,
+[ --enable-darwin-universal build universal binaries on darwin i386],
+[ case "$enableval" in
+ no) enable_darwin_universal=no ;;
+ *) enable_darwin_univeral=yes ;;
+ esac
+],enable_darwin_universal=no)
+
+
+AC_ARG_ENABLE(darwin-64bit,
+[ --enable-darwin-64bit build 64bit binaries on darwin],
+[ case "$enableval" in
+ no) enable_darwin_64bit=no ;;
+ *) enable_darwin_64bit=yes ;;
+ esac
+],enable_darwin_64bit=no)
+
+AC_ARG_ENABLE(m64-build,
+[ --enable-m64-build build 64bit binaries using the -m64 flag to (g)cc],
+[ case "$enableval" in
+ no) enable_m64_build=no ;;
+ *) enable_m64_build=yes ;;
+ esac
+],enable_m64_build=no)
+
+dnl OK, we might have darwin switches off different kinds, lets
+dnl check it all before continuing.
+TMPSYS=`uname -s`-`uname -m`
+if test X${enable_darwin_universal} = Xyes; then
+ if test X${enable_darwin_64bit} = Xyes; then
+ AC_MSG_ERROR([--enable-darwin-universal and --enable-darwin-64bit mutually exclusive])
+ fi
+ enable_hipe=no
+ CFLAGS="-arch i386 -arch ppc $CFLAGS"
+ export CFLAGS
+ LDFLAGS="-arch i386 -arch ppc $LDFLAGS"
+ export LDFLAGS
+fi
+if test X${enable_darwin_64bit} = Xyes; then
+ if test X"$TMPSYS" '!=' X"Darwin-i386"; then
+ AC_MSG_ERROR([--enable-darwin-64bit only supported on x86 host])
+ fi
+ enable_hipe=no
+ CFLAGS="-m64 $CFLAGS"
+ export CFLAGS
+ LDFLAGS="-m64 $LDFLAGS"
+ export LDFLAGS
+fi
+
+if test X${enable_m64_build} = Xyes; then
+ enable_hipe=no
+ CFLAGS="-m64 $CFLAGS"
+ export CFLAGS
+ LDFLAGS="-m64 $LDFLAGS"
+ export LDFLAGS
+fi
+
+export ERL_TOP
+AC_CONFIG_SUBDIRS(lib erts)
+
+AC_OUTPUT(Makefile)
+
+pattern="lib/*/SKIP"
+files=`echo $pattern`
+if test "$files" != "$pattern"; then
</