[m-rev.] for review: header files for erlang backend

Julien Fischer juliensf at csse.unimelb.edu.au
Thu Jul 12 09:56:09 AEST 2007


On Wed, 11 Jul 2007, Peter Wang wrote:

> Estimated hours taken: 4
> Branches: main
>
> Add support for header files to the Erlang back-end.  These have the extension
> .hrl.  Code from :- pragma foreign_decls are put into the modules's .hrl file,
> unless it has the `local' attribute.  Header files of imported modules
> are automatically included in the generated Erlang source files.
>
> compiler/elds.m:
> compiler/erl_code_gen.m:
> 	Record imported modules in the ELDS structure.
>
> compiler/elds_to_erlang.m:
> 	Generate .hrl files when generating .erl files.
>
> 	Add -include("<module>.erl"). directives in generated .erl files,
> 	for each imported module.
>
> compiler/options.m:
> 	Add option --erlang-include-directory <dir> which specifies
> 	where to search for .hrl files.
>
> compiler/handle_options.m:
> 	Add --erlang-include-directory <dir>/lib/<grade>/inc
> 	to search for .hrl files for installed libraries.
>
> 	Add --erlang-include-directory <pwd>/Mercury/hrls
> 	or <pwd>/Mercury/<grade>/Mercury/hrls
> 	to search for .hrl files for the current directory.
>
> compiler/compile_target_code.m:
> 	Pass -I<dir> options to the Erlang compiler for each
> 	--erlang-include-directory <dir> option.
>
> compiler/make.dependencies.m:
> compiler/make.m:
> compiler/make.module_target.m:
> compiler/make.program_target.m:
> compiler/make.util.m:
> compiler/modules.m:
> 	Update `mmc --make' to build, install and clean .hrl files.
>
> 	Unrelated fix: mark _init.erl and _init.beam files as grade dependent.
>
> doc/user_guide.texi:
> 	Document --erlang-include-directory and --erlang-native-code (which was
> 	missed previously).
>
> library/io.m:
> 	Add `local' attributes to foreign_decls which shouldn't be exported.

That's fine.

Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list