erlc program provides a common way to run
all compilers in the Erlang system.
Depending on the extension of each input file,
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
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_alloption 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_libdirectives in the Erlang compiler. Defaults to the library directory of the emulator where the compiler is run.
.beamfile, depending on which emulator the compiler is run.
pathin the option list for
erl(1), erl_compile(3), compile(3), yecc(3), snmp(3)