This program compiles .rel, .script, .boot and sys.config files for erlang applications. It supports incremental and recursive builds, and is intended to be (much) easier and safer to use than doing it all manually. This program does not generate beam code from Erlang source files.
The program makes some assumptions:
The program (henceforth called 'builder') can be customized
using a number of options. The options are prioritized in
the following order: (1) those given as arguments to the
builder:go/1
function, those in the BUILD_OPTIONS
file, and (3) the hard-coded defaults.
Valid options are
{Key,Value}
options.
If this option is not given, builder will look in [AppDir] and
[AppDir]/src
for a file called BUILD_OPTIONS.ScriptName : filename()
,
the name of the script file.[AppDir]/priv
.[OutDir]/sys.config
.[AppDir]/src/[AppName].rel.src
.[AppName]
or whatever is in the
.rel
file..rel.src
file, the applications
listed in this file are included first, in the order in which
they are listed..app.src
file are added (if not
already listed), also in the order in which they are listed..rel.src
file, not already listed, are added.
(note that applications listed in 'included_applications' of
the .app.src
file are not included here. The
.rel
file can be used to override this definition,
so it would be an error to include it at this point.)"/OTP/lib/kernel*/ebin"
(basically anything that
regexp:sh_to_awk/1
understands.)[AppDir]/src
, extract
their module names, and include these module names in the
'modules'
list of the .app
file.systools:make_script()
to generate .script and .boot files in [OutDir]. If false, it
will assume that there is a working .boot file. Default is true.Options
will be passed to the
systools:make_script()
command for building the
.boot
script. Note that the 'path'
option
is generated by builder. It cannot be overridden.
See erl -man systools
for available options.'auto'
, builder will generate a small sh script
that makes it easier to start the system; If 'none'
,
no script will be generated. Default is 'none'
on
non-UNIX systems and 'auto'
on UNIX systems.Opts
will be appended to the erl
command line. The builder will automatically put in options to
identify the boot script, sys.config, and possible boot variables.{M,F,A}
tuple, where
apply(M,F,A)
results in a list,
[{AppName, [{Key, Value}]}]
, or finally just specify
the data in place. The builder will look for similar config
directives in any BUILD_OPTIONS files of other applications that
are part of the build, and all inputs will be merged
into a common sys.config
.Config
in this case
is the same as Config
above. The difference between
this option and specifying environment variables for the other
application using the above option, is that with a simple
{config, ...}
directive, builder will also check
for a similar directive in the other application, and all
different inputs will be merged. Using a {{config,App},...}
option, builder will not look into that application further.Exported Functions | |
---|---|
early_debug_on/0 | |
find_app/2 | |
go/0 | |
go/1 |
early_debug_on() -> term()
find_app(Arg1, Arg2) -> term()
go() -> term()
go(Arg1) -> term()