caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Automake support for OCaml
@ 2003-12-22  7:48 Tom Murray
  2003-12-22 10:36 ` Stefano Zacchiroli
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Murray @ 2003-12-22  7:48 UTC (permalink / raw)
  To: caml-announce

[-- Attachment #1: Type: text/plain, Size: 1517 bytes --]

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

[-- Attachment #2: Type: text/enriched, Size: 1572 bytes --]

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:


<fontfamily><param>Courier</param>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 


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-12-22 18:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-22  7:48 [Caml-list] Automake support for OCaml Tom Murray
2003-12-22 10:36 ` Stefano Zacchiroli
2003-12-22 17:43   ` Tom Murray
2003-12-22 18:25     ` skaller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).