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 MAA24362; Thu, 11 Mar 2004 12:09:31 +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 MAA25524 for ; Thu, 11 Mar 2004 12:09:29 +0100 (MET) Received: from fichte.ai.univie.ac.at (fichte.ai.univie.ac.at [131.130.174.156]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i2BB9RHd006155 for ; Thu, 11 Mar 2004 12:09:28 +0100 Received: from fichte.ai.univie.ac.at (markus@localhost [127.0.0.1]) by fichte.ai.univie.ac.at (8.12.3/8.12.3/Debian-6.6) with ESMTP id i2BB9RHn018610; Thu, 11 Mar 2004 12:09:27 +0100 Received: (from markus@localhost) by fichte.ai.univie.ac.at (8.12.3/8.12.3/Debian-6.6) id i2BB9QHs018609; Thu, 11 Mar 2004 12:09:26 +0100 Date: Thu, 11 Mar 2004 12:09:26 +0100 From: Markus Mottl To: Kenneth Knowles Cc: caml-list@inria.fr Subject: Re: [Caml-list] [ANNOUNCE] Development versions: ocamlconf, ASPCC Message-ID: <20040311110926.GB16253@fichte.ai.univie.ac.at> Mail-Followup-To: Kenneth Knowles , caml-list@inria.fr References: <20040303014757.GA23400@tallman.kefka.frap.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040303014757.GA23400@tallman.kefka.frap.net> User-Agent: Mutt/1.4.1i X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 knowles:99 criticism:01 threads:01 ifndef:01 catch-all:01 passing:01 ocaml:01 command:98 command:98 simpler:01 makefile:02 mottl:02 mottl:02 native:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Keywords: X-UID: 115 On Tue, 02 Mar 2004, Kenneth Knowles wrote: > * OcamlMakefile is awkward with multiple targets (such as suites > of utilities) and I'd rather write (or depend on) a simple ocaml > script than a complex Makefile I have taken this criticism as motivation to make OCamlMakefile more useful with subprojects (i.e. multiple targets). The newest release is now available and should make this task much simpler. Here is an example from the distribution on how to specify two subprojects: --------------------------------------------------------------------------- # Set OCamlMakefile to use export OCAMLMAKEFILE = ../OCamlMakefile # Export some common variable settings export THREADS = yes # Define project "ex1" export PROJ_ex1 = \ SOURCES=ex1.ml \ RESULT=ex1 # Define project "ex2" export PROJ_ex2 = \ SOURCES=ex2.ml \ RESULT=ex2 # If the environment does not define subprojects to handle, # then use "ex1 ex2" as default ifndef SUBPRJS export SUBPRJS = ex1 ex2 endif # Default target to use all: bc # Catch-all target will be applied to all subprojects automatically %: @make -f $(OCAMLMAKEFILE) subprjs SUBTARGET=$@ --------------------------------------------------------------------------- You can use the usual shortcuts like "make nc" (= build native code), etc., for compiling several subprojects at once. Setting/exporting variable "SUBPRJS" in the shell environment or passing it to "make" on the command line allows you to refer to any subset of your projects that should be affected by the next command. I think this is as easy as things can get - but feel free to send me suggestions for improvement! Regards, Markus -- Markus Mottl http://www.oefai.at/~markus markus@oefai.at ------------------- 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