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 -- Jason Hickey http://www.cs.caltech.edu/~jyh Caltech Computer Science Tel: 626-395-6568 FAX: 626-792-4257