The erlc
program provides a common way to run
all compilers in the Erlang system.
Depending on the extension of each input file, erlc
will invoke the appropriate compiler.
Regardless of which compiler is used, the same flags are used to provide parameters such as include paths and output directory.
erlc flags file1.ext file2.ext...
Erlc
compiles one or more files.
The files must include the extension, for example .erl
for Erlang source code, or .yrl
for Yecc source code.
Erlc
uses the extension to invoke the correct compiler.
The following flags are supported:
export_all
option for the Erlang
compiler can be specified as follows:
erlc +export_all file.erlDepending on the platform, the value may need to be quoted if the shell itself interprets certain characters. On Unix, terms which contain tuples and list must be quoted. Terms which contain spaces must be quoted on all platforms.
The flags in this section are useful in special situations such as re-building the OTP system.
include_lib
directives
in the Erlang compiler.
Defaults to the library directory of the emulator where the
compiler is run.
.beam
file.
.erl
file.
yecc:yecc/4
function).
.bin
file.
.hrl
file.
path
in the option list for
systools:make_script/2
).
erl(1), erl_compile(3), compile(3), yecc(3), snmp(3)