From 57c3246511434f42214e113b8902af10ab9cca49 Mon Sep 17 00:00:00 2001 From: xsipewe Date: Tue, 21 Jun 2016 15:50:34 +0200 Subject: erts: Editorial changes --- erts/doc/src/erlc.xml | 274 +++++++++++++++++++++++++------------------------- 1 file changed, 138 insertions(+), 136 deletions(-) (limited to 'erts/doc/src/erlc.xml') diff --git a/erts/doc/src/erlc.xml b/erts/doc/src/erlc.xml index a64927fec2..ca3412b72c 100644 --- a/erts/doc/src/erlc.xml +++ b/erts/doc/src/erlc.xml @@ -28,7 +28,7 @@ 1 Bjarne Däcker - 97-03-24 + 1997-03-24 A erlc.xml @@ -38,167 +38,162 @@

The 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.

-

The current working directory, ".", will not be included - in the code path when running the compiler (to avoid loading - Beam files from the current working directory that could potentially - be in conflict with the compiler or Erlang/OTP system used by the - compiler).

+ invokes the appropriate compiler. + Regardless of which compiler is used, the same flags are used to provide + parameters, such as include paths and output directory.

+

The current working directory, ".", is not included + in the code path when running the compiler. This to avoid loading + Beam files from the current working directory that could potentially + be in conflict with the compiler or the Erlang/OTP system used by the + compiler.

+ erlc flags file1.ext file2.ext... - Compile files + Compile files. -

compiles one or more files. - The files must include the extension, for example - for Erlang source code, or for Yecc source code. - uses the extension to invoke the correct compiler.

+

Compiles one or more files. The files must include the extension, + for example, for Erlang source code, or + for Yecc source code. + uses the extension to invoke the correct + compiler.

Generally Useful Flags -

The following flags are supported: -

+

The following flags are supported:

- -I directory + -I <Directory>

Instructs the compiler to search for include files in - the specified directory. When encountering an - or directive, the - compiler searches for header files in the following + the Directory. When encountering an + or + directive, the compiler searches for header files in the following directories:

- +

, the current working directory of the - file server;

+ file server

-

the base name of the compiled file;

+

The base name of the compiled file

-

the directories specified using the option. - The directory specified last is searched first.

+

The directories specified using option ; + the directory specified last is searched first

- -o directory + -o <Directory> -

The directory where the compiler should place the output files. - If not specified, output files will be placed in the current working - directory.

+

The directory where the compiler is to place the output files. + Defaults to the current working directory.

- -Dname + -D<Name>

Defines a macro.

- -Dname=value + -D<Name>=<Value> -

Defines a macro with the given value. +

Defines a macro with the specified value. The value can be any Erlang term. Depending 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 + On Unix, terms containing tuples and lists + must be quoted. Terms containing spaces must be quoted on all platforms.

- -Werror + -W<Error>

Makes all warnings into errors.

- -Wnumber + -W<Number> -

Sets warning level to number. Default is . - Use to turn off warnings.

+

Sets warning level to Number. Defaults to + . To turn off warnings, + use .

- -W + -W

Same as . Default.

- -v + -v

Enables verbose output.

- -b output-type + -b <Output_type>

Specifies the type of output file. - Generally, output-type is the same as the file extension - of the output file but without the period. - This option will be ignored by compilers that have a + Output_type is the same as the file extension + of the output file, but without the period. + This option is ignored by compilers that have a single output format.

- -smp + -smp -

Compile using the SMP emulator. This is mainly useful - for compiling native code, which needs to be compiled with the same - run-time system that it should be run on.

+

Compiles using the SMP emulator. This is mainly useful + for compiling native code, which must be compiled with the same + runtime system that it is to be run on.

- -M + -M -

Produces a Makefile rule to track headers dependencies. The - rule is sent to stdout. No object file is produced. -

+

Produces a Makefile rule to track header dependencies. The + rule is sent to stdout. No object file is produced.

- -MF Makefile + -MF <Makefile> -

Like the option above, except that the - Makefile is written to Makefile. No object - file is produced. -

+

As option , except that the + Makefile is written to Makefile. No object + file is produced.

- -MD + -MD -

Same as .Pbeam]]>. -

+

Same as .Pbeam]]>.

- -MT Target + -MT <Target> -

In conjunction with or - , change the name of the rule emitted - to Target. -

+

In conjunction with option or + , changes the name of the rule emitted + to Target.

- -MQ Target + -MQ <Target> -

Like the option above, except that - characters special to make(1) are quoted. -

+

As option , except that characters special to + make/1 are quoted.

- -MP + -MP -

In conjunction with or - , add a phony target for each dependency. -

+

In conjunction with option or + , adds a phony target for each dependency.

- -MG + -MG -

In conjunction with or - , consider missing headers as generated - files and add them to the dependencies. -

+

In conjunction with option or + , considers missing headers as generated + files and adds them to the dependencies.

- -- + --

Signals that no more options will follow. - The rest of the arguments will be treated as file names, + The rest of the arguments is treated as filenames, even if they start with hyphens.

- +term + +<Term> -

A flag starting with a plus ('+') rather than a hyphen - will be converted to an Erlang term and passed unchanged to +

A flag starting with a plus (+) rather than a hyphen + is converted to an Erlang term and passed unchanged to the compiler. - For instance, the option for the Erlang + For example, option for the Erlang compiler can be specified as follows:

 erlc +export_all file.erl

Depending 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 + On Unix, terms containing tuples and lists + must be quoted. Terms containing spaces must be quoted on all platforms.

@@ -206,19 +201,19 @@ erlc +export_all file.erl
Special Flags -

The flags in this section are useful in special situations - such as re-building the OTP system.

+

The following flags are useful in special situations, + such as rebuilding the OTP system:

- -pa directory + -pa <Directory> -

Appends directory to the front of the code path in +

Appends Directory to the front of the code path in the invoked Erlang emulator. This can be used to invoke another compiler than the default one.

- -pz directory + -pz <Directory> -

Appends directory to the code path in +

Appends Directory to the code path in the invoked Erlang emulator.

@@ -226,63 +221,70 @@ erlc +export_all file.erl
Supported Compilers +

The following compilers are supported:

- .erl + .erl

Erlang source code. It generates a file.

-

The options -P, -E, and -S are equivalent to +'P', - +'E', and +'S', except that it is not necessary to include the single quotes to protect them - from the shell.

-

Supported options: -I, -o, -D, -v, -W, -b.

+

Options -P, -E, and -S are equivalent to + +'P', +'E', and +'S', except that it is not + necessary to include the single quotes to protect them from the + shell.

+

Supported options: -I, -o, -D, -v, + -W, -b.

- .S + .S -

Erlang assembler source code. It generates a file.

-

Supported options: same as for .erl.

+

Erlang assembler source code. It generates a + file.

+

Supported options: same as for .erl.

- .core + .core -

Erlang core source code. It generates a file.

-

Supported options: same as for .erl.

+

Erlang core source code. It generates a + file.

+

Supported options: same as for .erl.

- .yrl + .yrl

Yecc source code. It generates an file.

-

Use the -I option with the name of a file to use that file - as a customized prologue file (the option).

-

Supported options: -o, -v, -I, -W (see above).

+

Use option -I with the name of a file to use that file + as a customized prologue file (option + ).

+

Supported options: -o, -v, -I, -W.

- .mib + .mib

MIB for SNMP. It generates a file.

-

Supported options: -I, -o, -W.

+

Supported options: -I, -o, -W.

- .bin + .bin -

A compiled MIB for SNMP. It generates a file.

-

Supported options: -o, -v.

+

A compiled MIB for SNMP. It generates a + file.

+

Supported options: -o, -v.

- .rel + .rel

Script file. It generates a boot file.

-

Use the -I to name directories to be searched for application - files (equivalent to the in the option list for - ).

-

Supported options: -o.

+

Use option -I to name directories to be searched for + application files (equivalent to the in the + option list for ).

+

Supported option: -o.

- .asn1 + .asn1 -

ASN1 file.

-

Creates an , , and file from - an file. Also compiles the using the Erlang - compiler unless the options is given.

-

Supported options: -I, -o, -b, -W.

+

ASN1 file. It creates an , + , and file from + an file. Also compiles the + using the Erlang compiler unless option + is specified.

+

Supported options: -I, -o, -b, -W.

- .idl + .idl -

IC file.

-

Runs the IDL compiler.

-

Supported options: -I, -o.

+

IC file. It runs the IDL compiler.

+

Supported options: -I, -o.

@@ -290,20 +292,20 @@ erlc +export_all file.erl
Environment Variables - ERLC_EMULATOR - The command for starting the emulator. - Default is erl in the same directory as the erlc program - itself, or if it doesn't exist, erl in any of the directories - given in the PATH environment variable. + ERLC_EMULATOR + The command for starting the emulator. Defaults to erl + in the same directory as the erlc program itself, + or, if it does not exist, erl in any of the directories + specified in environment variable PATH.
- SEE ALSO -

erl(1), - compile(3), - yecc(3), - snmp(3)

+ See Also +

erl(1), + compiler:compile(3), + parsetools:yecc(3), + snmp:snmp(3)

-- cgit v1.2.3