<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2003/12/c9bf9f5d4423a9259f12ccc805fe4c1d"
  from="Tom Murray &lt;yozhik@c...&gt;"
  author="Tom Murray"
  date="2003-12-22T08:44:35"
  subject="[Caml-list] Automake support for OCaml"
  prev="2003/12/2a656034d7dd922a09976441973503de"
  next="2003/12/950b260ab356953ff0e1e925df4dc156"
  next-in-thread="2003/12/24e2a921fb8bb7c5206d495ff5b53e13"
  prev-thread="2003/12/2a656034d7dd922a09976441973503de"
  next-thread="2003/12/fa15b016f5aca839378d070acde35693"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] Automake support for OCaml">
<msg 
  url="2003/12/c9bf9f5d4423a9259f12ccc805fe4c1d"
  from="Tom Murray &lt;yozhik@c...&gt;"
  author="Tom Murray"
  date="2003-12-22T08:44:35"
  subject="[Caml-list] Automake support for OCaml">
<msg 
  url="2003/12/24e2a921fb8bb7c5206d495ff5b53e13"
  from="Stefano Zacchiroli &lt;zack@b...&gt;"
  author="Stefano Zacchiroli"
  date="2003-12-22T14:05:00"
  subject="Re: [Caml-list] Automake support for OCaml">
<msg 
  url="2003/12/5edfc6baf2fe656e8496de78af556d44"
  from="Tom Murray &lt;yozhik@c...&gt;"
  author="Tom Murray"
  date="2003-12-22T17:43:35"
  subject="Re: [Caml-list] Automake support for OCaml">
<msg 
  url="2003/12/b60a5b139b2013e8b7f1ee93a77ffe68"
  from="skaller &lt;skaller@o...&gt;"
  author="skaller"
  date="2003-12-22T18:26:19"
  subject="Re: [Caml-list] Automake support for OCaml">
</msg>
</msg>
</msg>
</msg>
</thread>

<contents>
Bonjour--

I've been working on a patch to automake to support packages with Caml 
code.

Current features include compilation of programs and libraries, 
possibly with mixed Caml and C code, automatic dependency generation, 
and both bytecode and native code compilation. To get an idea, here is 
a sample Makefile.am:

CAML_INCLUDES = -I ../ -pp "camlp4o pa_extend.cmo"
CAML_LDADD    = unix.cma

bin_MLPROGRAMS = myprog
lib_MLLIBRARIES = mylib.cma

myprog_SOURCES = myprog.mli myprog.ml myprog_c.c

mylib_cma_SOURCES = mylib1.ml mylib2.ml
mylib_cma_LIBADD  = otherlib.cma

This defines a program and a library to be built. Typing "make all" 
will build myprog and mylib.cma. Typing "make opt" will build 
myprog.opt and mylib.cmxa. The CAML_INCLUDES variable applies the -I 
flag and an invocation of Camlp4 to all targets. The CAML_LDADD links 
in unix.cma with bytecode targets, unix.cmxa with native code. Also 
note that myprog includes an interface file myprog.mli that is compiled 
to myprog.cmi, but of course excluded from the link. The mylib.cma 
library also links in otherlib.cma (or otherlib.cmxa).

The main things left to do are:
* install support (I plan to use ocamlfind)
* m4 macros to ease searching for Caml libraries on the system
* support for more tools such as ocamllex/ocamlyacc (you _can_ do this 
manually now, of course)
* improved integration with C

A little page and download are at 
http://www.lemurz.org/projects/autocaml/

Your comments and suggestions are appreciated.

Enjoy!

tm

</contents>

</message>

