descriptionErlware make based build system for Erlang/OTP
homepage URLhttp://code.google.com/p/otp-base
repository URLhttp://git.erlware.org/otp-base.git
ownermartinjlogan@erlware.org
last changeSat, 15 Mar 2008 03:39:47 +0000 (14 22:39 -0500)
last refreshSat, 31 Oct 2009 21:10:59 +0000 (31 22:10 +0100)
content tags
add:
README
Much more information on these topics can be found at www.erlware.org

# Downloading Dependencies

OTP Base requires a few erlang packages in order to run correctly. To get 
these applications we use Erlware Faxien which can be downloaded from 
'http://code.google.com/p/faxien' and use it to install the required packages.

1. Bootstrap Faxien with the appropriate bootstrapper from the download site.

2. Use faxien install to install the erl release which provides the Erlang 
   shell and the erlc compiler.
    * `sudo /usr/local/erlware/bin/faxien install erl`

3. Install the following apps with 'faxien install-app'.
    * `sudo /usr/local/erlware/bin/faxien install-app fslib`
    * `sudo /usr/local/erlware/bin/faxien install-app gas`
    * `sudo /usr/local/erlware/bin/faxien install-app eunit`
    * Tip The Faxien release itself uses all the apps listed above so 
      instead of installing them all separately you can save time by simply 
      using the upgrade command to upgrade the existing versions to the 
      latest greatest. Do this as follows: `sudo /usr/local/erlware/bin/faxien upgrade-all-apps`

at this point you should be ready to go. 

# Building the tree

To build, type make, it should all work from there. Applications are built 
under the 'lib' dir and releases under the 'release' directory.

# Creating a new application

A new application can be created by using the `tools/application_generation` 
utility. This utility will create a basic OTP application framework under the 
lib directory

    usage: application_generation <app-name> <prefix>

Appname is the name of the application that you would like to create. The 
prefix is usually the first letter of each word in the appname. This prefix is 
to avoid name clashes between applications included in a release (Erlang has a
flat name space).

   example usage: application_generation my_app ma

which results in

   lib/my_app

# Creating a new release

A release is the OTP packaging structure that binds together a number of 
applications, configuration, and startup scripts to create a standalone 
Erlang service. To create a new release from which to run your application(s) 
you can use the tools/release_generation script.

    usage: release_generation <release-name>
    example usage: release_generation test

The example above will create a release called test under release/test

# Running a release

Your release should contain all that you need to run your application. 
You have only to edit your .rel.src file to add to it the applications you 
have developed over in the lib side. If your application depends on any 
applications that are supplied outside of your otp-base build tree you can 
always install them with faxien and then add them to your .rel.src file as well.

To run a release there are two options: The first is local. A local version 
can be found in the `release/<release-name>/local` directory which is added by 
the make process. This should be used during development to run your release 
interactively via an Erlang shell. To run a release in local mode cd into the 
"local" directory and run `<release-name>.sh`.

In the case where you want to create a production ready release on one machine 
and then deploy it on multiple identical machines with faxien  you may create 
a production package with `make package`. To do this run make package from the 
`release/<release-name>` directory. This will create a directory 
`<release-name>-<release-vsn>`. This this directory can be tarred up and the 
tar can be shipped to its destination and installed with faxien. This 
directory may also be published to a repo for remote installation on another 
box via faxien. See the docs for faxien at erlware.org for more details on this. 

Finally, if you simply want to build and install your application locally all in 
go run: `make install`.
shortlog
2008-03-15 Martin Loganupdated make file to remove user defined filesmaster
2008-03-15 Martin Loganaltered the make file to reflect new faxien naming...
2008-02-22 Martin Loganfixed syntax error in .app.src
2008-02-22 Martin Loganfixed the copy error
2008-02-18 Martin Loganproper erts vsn is populated in multi erts case now.
2008-02-18 Martin Loganadded teh %MODULES% back
2008-02-18 Martin Loganadded install functionality.
2008-02-16 Martin Loganaded new comments around applications dependencies.
2008-02-07 Martin Loganmoved licence.txt to LICENCE
2008-02-06 Martin Loganadded these for convenience
2008-02-06 Martin Loganno longer relies on exported paths
2008-02-05 Martin Loganupdated version
2008-02-05 Martin Loganadded call to fs_boot_smithe:stage_apps
2008-02-04 Martin Loganreadme to reflect the fact that erlang sources are...
2008-02-04 Martin Loganupdated otp.mk and the readme
2008-02-04 Martin Loganblasted unused .mk and other build files
...
heads
16 years ago master