[m-rev.] for review: installing extra C headers with Mercury libraries

Peter Wang novalazy at gmail.com
Mon Sep 1 16:48:47 AEST 2008


On 2008-09-01, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
>
> For review by anyone.
>
> Estimated hours taken: 1
> Branches: main
>
> Add a mechanism that allows extra C header files to be installed as part
> of a Mercury library, in the same location as the header files generated
> by the Mercury compiler.

> This is useful when writing Mercury bindings
> to C++ libraries since these often require an interface from C++ to C to
> be written (at least where one does not already exist) and this usually
> involves one or more header files that are then referenced from foreign_decl
> pragmas on the Mercury side of things.

Not sure it's such a great idea, but the code looks fine.

Maybe we can have an mmc --output-install-prefix option, which would
allow you to perform the installation outside of mmc --make.

Peter

> Index: compiler/make.program_target.m
> ===================================================================
> RCS file: /home/mercury/mercury1/repository/mercury/compiler/make.program_target.m,v
> retrieving revision 1.90
> diff -u -r1.90 make.program_target.m
> --- compiler/make.program_target.m	25 Jul 2008 00:47:56 -0000	1.90
> +++ compiler/make.program_target.m	31 Aug 2008 22:41:35 -0000
...
> @@ -1123,6 +1124,7 @@
>           Succeeded = no
>       ).
>
> +
>   :- pred install_ints_and_headers(bool::in, module_name::in, bool::out,
>       make_info::in, make_info::out, io::di, io::uo) is det.
>

Delete that.



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