From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA12877; Mon, 22 Dec 2003 09:44:35 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA12715 for ; Mon, 22 Dec 2003 09:44:33 +0100 (MET) Received: from flavatown.mail.pas.earthlink.net (flavatown.mail.pas.earthlink.net [207.217.120.148]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id hBM8iJb05291 for ; Mon, 22 Dec 2003 09:44:31 +0100 (MET) Received: from scaup.mail.pas.earthlink.net (scaup.mail.pas.earthlink.net [207.217.120.49]) by flavatown.mail.pas.earthlink.net (8.11.7+Sun/8.11.6) with ESMTP id hBM7mZs16190 for ; Sun, 21 Dec 2003 23:48:35 -0800 (PST) Received: from h-68-164-56-14.lsanca54.dynamic.covad.net ([68.164.56.14] helo=computer.org) by scaup.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 1AYKnT-0005X2-00 for caml-announce@inria.fr; Sun, 21 Dec 2003 23:48:12 -0800 Date: Sun, 21 Dec 2003 23:48:10 -0800 Mime-Version: 1.0 (Apple Message framework v552) Content-Type: multipart/alternative; boundary=Apple-Mail-17--717189663 Subject: [Caml-list] Automake support for OCaml From: Tom Murray To: caml-announce@inria.fr Message-Id: <307FE372-3453-11D8-BA54-000A9577557E@computer.org> X-Mailer: Apple Mail (2.552) X-Loop: caml-list@inria.fr X-Spam: no; 0.00; automake:01 automake:01 -pp:01 camlp:01 myprog:01 mylib:01 myprog:01 mli:01 mylib:01 invocation:01 camlp:01 mli:01 ocamlfind:01 fontfamily:01 -pp:01 X-Attachments: type="text/enriched" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk --Apple-Mail-17--717189663 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed 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 --Apple-Mail-17--717189663 Content-Transfer-Encoding: 7bit Content-Type: text/enriched; charset=US-ASCII 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: CourierCAML_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 --Apple-Mail-17--717189663-- ------------------- 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