From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 8462BBC6B for ; Wed, 7 Mar 2007 16:53:29 +0100 (CET) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l27FrS3s024381 for ; Wed, 7 Mar 2007 16:53:29 +0100 Received: by ug-out-1314.google.com with SMTP id k3so574498ugf for ; Wed, 07 Mar 2007 07:53:28 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=Xe0VGACRMj2s2fwE5T6SAR6aQUXj3W/zRnGkT85CBBm30/0WpffuCo6nn7kyLkRqeA4gkku8JNp9jLYYRkDxe9q8eyIR6s8D9rIAa4CZClsLskyDqev1zYAME/8gJU0v5xS9oZKsxuYdJEcbfbhnx6PL6d3vYPO8rHxP9Jqce8A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=QY9iAr7XaFQWlN9G5jQlaAPspFSoGOg7HZeWAVfYEHCLLMO6yatMf1+O+3K2Y06/dYWvKNcdd7hAMj/0mcufk8/EFOEgq16/DMe0EhjMAWgqpSUCACSM4aQqmFWuDwEzl1YmSUkenWsruayX67W6KJ5uw03Q7uYMCSVGyTApp4Q= Received: by 10.66.252.4 with SMTP id z4mr4549871ugh.1173282808189; Wed, 07 Mar 2007 07:53:28 -0800 (PST) Received: from ?192.168.1.33? ( [83.53.109.173]) by mx.google.com with ESMTP id q40sm2221680ugc.2007.03.07.07.53.25; Wed, 07 Mar 2007 07:53:27 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v752.3) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: Caml List From: Joel Reymont Subject: ocamlbuild is VERY nifty Date: Wed, 7 Mar 2007 15:53:19 +0000 X-Mailer: Apple Mail (2.752.3) X-j-chkmail-Score: MSGID : 45EEDFF8.000 on discorde : j-chkmail score : XXX : 5/20 1 0.000 -> 3 X-Miltered: at discorde with ID 45EEDFF8.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 byte:01 mli:01 lexer:01 mll:01 parser:01 parser:01 util:01 symtab:01 ocamlfind:01 ocamlfind:01 -package:01 ocaml:01 -linkpkg:01 ocamlc:01 I asked around before settling on a build system since I'm new to OCaml. I looked at OMake, OCamlMakefile and found them complex and confusing. Then William Neuman pointed me to ocamlbuild and Nicolas Pouillard helped me hook it up to external libraries via a plugin. Deep into my first project I confirm that ocamlbuild is VERY nifty. I can automatically rebuild when any parts of my project change and then run my unit tests. All I need to do is: ocamlbuild test.byte -- *** my project *** 189 easy.mli 282 easy_lexer.mll 420 easy_parser.mly 17 myocamlbuild.ml 14 parser_util.ml 30 symtab.ml 8 test.ml 284 parser_test.ml 1355 total *** test.ml *** open OUnit let suite = "Morpher" >::: [Parser_test.suite] let _ = run_test_tt_main suite *** myocamlbuild.ml *** open Ocamlbuild_plugin;; open Command;; let packages = "ounit" (* "pkg1,pkg2,..." *);; let ocamlfind cmd = S[A"ocamlfind"; A cmd; A"-package"; A packages];; flag ["ocaml"; "link"] (A"-linkpkg");; dispatch begin function | After_options -> Options.ocamlc := ocamlfind "ocamlc"; Options.ocamlopt := ocamlfind "ocamlopt"; | _ -> () end -- http://wagerlabs.com/