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 QAA15480; Sat, 22 Nov 2003 16:34:51 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA15854 for ; Sat, 22 Nov 2003 16:34:50 +0100 (MET) Received: from mail3.tpgi.com.au (mail.tpgi.com.au [203.12.160.59]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id hAMFYl120543 for ; Sat, 22 Nov 2003 16:34:48 +0100 (MET) Received: from syd-ts18-2600-035.tpgi.com.au (syd-ts18-2600-035.tpgi.com.au [203.58.21.35]) by mail3.tpgi.com.au (8.11.6/8.11.6) with ESMTP id hAMFYiw22968 for ; Sun, 23 Nov 2003 02:34:45 +1100 Subject: Re: [Caml-list] Building large and portable projects From: skaller Reply-To: skaller@ozemail.com.au To: caml-list@inria.fr In-Reply-To: <20031121190447.GE1154@gallu.homelinux.org> References: <20031120195614.GB441@gallu.homelinux.org> <000f01c3afd1$30033c90$0274a8c0@PWARP> <20031121052549.GA8599@davidb.org> <008301c3aff3$1030e760$0274a8c0@PWARP> <20031121064950.GA836@gallu.homelinux.org> <1069431167.5426.45.camel@pelican> <20031121190447.GE1154@gallu.homelinux.org> Content-Type: text/plain Message-Id: <1069511662.6703.11.camel@pelican> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 23 Nov 2003 01:34:22 +1100 Content-Transfer-Encoding: 7bit X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 ozemail:01 le-gall:01 ocamldep:01 camlp:01 expressive:01 camlp:01 interscript:01 hooks:01 python:01 ocaml:01 caml:01 caml:01 byte:01 toplevel:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sat, 2003-11-22 at 06:04, sylvain.le-gall@polytechnique.org wrote: > I don't want to reproduce make bugs... I just want to do something > simple where you can type : > > let my_prog = { > name : "my_prog"; > compile_target : [Opt;Byte]; > toplevel_files : [ "my_prog.ml" ; > "something_ocamldep_dont_recognize_as_toplevel.ml" ]; > package : "all_my_life" ; > target_tag : Binary; ( or Documentation or Custom of string ) > } > > let _ = > add_target my_prog > > Ie, it is not makefile syntax. My guess is that the 'object oriented design paradigm' has something to say here -- do it bottom up. The first step is to define things like compare_time_stamp(f1, f2) a module for 'dependency graph', and other tools that may be useful. Then just write plain Ocaml code using these tools. This may be a bit long winded, so check out camlp4 to sweeten it up. The advantage of this approach is that a make script is an arbitrary caml script. Which means: it can do anything easily (since caml is so expressive), it is also type checked (hey, why shouldn't build scripts be type checked?) etc etc etc ... Finally after all that if you still think a language translator is needed to express the build conditions above and beyond caml with camlp4 ... then one can be written, plugged into the front, invoked by the caml build script, compiled and executed .. all without requiring ME or anyone else to use your language (you can just embed the translator in your package). This is basically what interscript does only its hooks Python and it's aimed at packaging software components (meaning source codes and documentation) in a more general fashion than merely building them would require. It actually has a language translator, but it's a pretty brain dead one that basically allows code, doco, and executable script to be mixed together in a single source file. ------------------- 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