Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Building large and portable projects
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: sylvain.le-gall@p...
Subject: Re: [Caml-list] Building large and portable projects
On Fri, Nov 21, 2003 at 09:05:22AM -0800, Jason Hickey wrote:
> Martin Jambon wrote:
> >Is there a convenient way to develop OCaml code, and be sure that 
> >this code will be configurable, compilable, installable and 
> >executable without changes, on any environment where OCaml is available?
> 
> We have been using omake to build several large projects, primarily on 
> Linux and Windows.  omake is written in OCaml, and provides a build 
> system with syntax similar to make, but project-wide dependency 
> analysis.  Here are some features:
> 
>     - omake runs on Unix, Windows, MacOS, and presumably
>       other architectures where OCaml is available.
>     - dependency analysis is project-wide (like cons),
>       based on MD5 digests
>     - automated dependency analysis
>     - there is builtin support for OCaml and C code,
>       and it is easy to add support for other kinds
>       of files (just like make).
>     - the OMakefile syntax is similar to GNU make, but
>         - omake has user-defined functions
>         - OMakefile programs are functional
>         - the .SUBDIRS target is used to define
>           the project hierarchy
>         - different parts of the project can have
>           different configuration.
> 
> omake is available by anonynous CVS from cvs.metaprl.org.
>    % cvs -d :pserver:anoncvs@cvs.metaprl.org:/cvsroot login
>    The password is anoncvs.
>    % cvs -d :pserver:anoncvs@cvs.metaprl.org:/cvsroot checkout omake
> 
> Alternatively, RPMs are available at rpm.nogin.org.
> 
> Here is a short description.  Every project must have an OMakeroot file 
> in the project root.  It is usually boilerplate; this is typical:
> 
>    # Include the standard configuration
>    include $(STDROOT)
> 
>    # Include the OMakefile
>    .SUBDIRS: .
> 
> The project commands are then placed in an OMakefile.  To build a 
> standalone OCaml program from files a.ml b.ml and c.ml, you just need 
> one line.  The OCamlProgram function is defined in the system OMakeroot.
> 
>    OCamlProgram(foo, a b c)
> 
> You can choose the byte-compiler, native-code compiler, or both.
> 
>    BYTE_ENABLED = true
>    NATIVE_ENABLED = true
>    OCamlProgram(foo, a b c)
> 
> Maybe you have some C files you need to include in your compile as well. 
>  Perhaps f.c is a generated file.
> 
>    f.c: f1.c f2.c
> 	cat $+ > $@
>    StaticCLibrary(bar, d e f)
>    LIBS = bar
>    OCamlProgram(foo, a b c)
> 
> Perhaps you use the C-preprocessor on some .mlp files:
> 
>    %.ml: %.mlp
> 	$(CPP) $*.mlp > $@
> 
> The system sources contain more examples, and the MetaPRL system, also 
> available at cvs.metaprl.org, provides a very large, complex, example.
> 
> Jason
> 
Hello,

It seems great to me...

Is there way to define camlp4 syntax ? ( for example XXX.ml needs camlp4
with cmo zoggy.cmo or something like that )

Is there a kind of configure in it ?

Can you use META files.

(... a lot of other question but i will take a look at it before asking
).

Kind regad
Sylvain LE GALL

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners