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=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id F04C0BC0B for ; Wed, 27 Dec 2006 19:25:24 +0100 (CET) Received: from blizzard.cs.caltech.edu (blizzard.cs.caltech.edu [131.215.44.2]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id kBRIPNXD015765 for ; Wed, 27 Dec 2006 19:25:24 +0100 Received: from localhost (flood.cs.caltech.edu [131.215.44.31]) by blizzard.cs.caltech.edu (Postfix) with ESMTP id AD0212A338F; Wed, 27 Dec 2006 10:25:22 -0800 (PST) Received: from snowstorm.cs.caltech.edu ([131.215.44.21]) by localhost (flood.cs.caltech.edu [131.215.44.31]) (amavisd-new, port 10024) with ESMTP id 01736-03; Wed, 27 Dec 2006 10:25:22 -0800 (PST) Received: from [192.168.3.10] (cpe-75-82-142-242.socal.res.rr.com [75.82.142.242]) by snowstorm.cs.caltech.edu (Postfix) with ESMTP id 4FCEE262FC8; Wed, 27 Dec 2006 10:25:22 -0800 (PST) Message-ID: <4592BA91.8050508@metaprl.org> Date: Wed, 27 Dec 2006 10:25:21 -0800 From: Aleksey Nogin Reply-To: OCaml Mailing List , Aleksey Nogin Organization: MetaPRL/Mojave Research Group User-Agent: Thunderbird 1.5.0.9 (X11/20061215) MIME-Version: 1.0 To: Ian Zimmerman , OCaml Mailing List , omake@metaprl.org Subject: Re: [Caml-list] Scripting in ocaml References: <6dbd4d000612201941wcd4b09anc503a13889576512@mail.gmail.com> <45915860.6030806@metaprl.org> <17af13780612261536x5f5f0d93sb1eb6ecef1b22598@mail.gmail.com> In-Reply-To: <17af13780612261536x5f5f0d93sb1eb6ecef1b22598@mail.gmail.com> X-Enigmail-Version: 0.94.1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 4592BA93.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 ocaml:01 osh:01 osh:01 hypothetical:01 dependencies:01 ocamlfind:01 foo:01 baz:01 foo:01 baz:01 dependencies:01 cygwin:01 invoke:01 unix:01 On 26.12.2006 15:36, Ian Zimmerman wrote: > On 12/26/06, Aleksey Nogin wrote: > >> Not quite scripting in OCaml, but related - the OMake build system comes >> with its own shell interpreter - osh. The language is not OCaml, but >> it's a functional language that was _specifically_ designed as a >> scripting language, so I would argue that writing scripts in osh is more >> convenient that scripting in OCaml (although, of course, for somebody >> already familiar with OCaml, learning osh might be a bit harder that >> learning some hypothetical scripting extension of OCaml). >> >> Note that if the goal is specifically "scripts to perform various build- >> and development-related tasks" as you've mentioned, then I would >> definitely suggest looking at OMake and osh - there the scripting >> language is the same as the build specification language and you can >> inline osh scriplets directly into "make-style" build rules of OMake. > > Does it handle building in general, or just OCaml-based projects? For > example, can it deduce header dependencies for a C file - possibly with a > plugin, like cons or scons? Yes, definitely. OMake is meant to be language-agnostic. It comes with standard libraries for OCaml (including support for preprocessors, for ocamlfind and experimental support for the Menhir parser-generator), C, C++ and LaTeX, including appropriate dependency scanning rules for there languages and support for projects that have a mixture of these languages. It should be fairly straightforward to add support for other languages as well (for example, recently Dirk Heinrichs had written an experimental Ada module). To rehash from http://omake.metaprl.org/, OMake is designed for scalability and portability and its features include: - Support for projects spanning several directories or directory hierarchies. - Fast, reliable, automated, scriptable dependency analysis using MD5 digests, with full support for incremental builds. - Fully scriptable, includes a library that providing support for standard tasks in C, C++, OCaml, and LaTeX projects, or a mixture thereof. For small projects, a configuration file may be as simple as a single line .DEFAULT: $(CProgram prog, foo bar baz) which states that the program "prog" is built from the files foo.c, bar.c, and baz.c. This one line will also invoke the default standard library scripts for discovering implicit dependencies in C files (such as dependencies on included header files). - Full native support for rules that build several files at once. - Portability: omake provides a uniform interface on Linux/Unix (including 64-bit architectures), Win32, Cygwin, Mac OS X, and other platforms that are supported by OCaml. - Built-in functions that provide the most common features of programs like grep, sed, and awk. These are especially useful on Win32. - Active filesystem monitoring, where the build automatically restarts whenever you modify a source file. This can be very useful during the edit/compile cycle. - A built-in command-interpreter osh that can be used interactively. Aleksey