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 EAA27884; Sat, 22 Nov 2003 04:30:26 +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 EAA26263 for ; Sat, 22 Nov 2003 04:30:24 +0100 (MET) Received: from dell.nogin.org (charter-242-037.caltech.edu [131.215.242.37]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id hAM3UM125564 for ; Sat, 22 Nov 2003 04:30:23 +0100 (MET) Received: from cs.caltech.edu (localhost.localdomain [127.0.0.1]) by dell.nogin.org (8.12.10/8.12.9) with ESMTP id hAM3ULkx007972 for ; Fri, 21 Nov 2003 19:30:22 -0800 Message-ID: <3FBED84D.1090401@cs.caltech.edu> Date: Fri, 21 Nov 2003 19:30:21 -0800 From: Aleksey Nogin Organization: California Institute of Technology, Computer Science Department User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6a) Gecko/20031023 X-Accept-Language: ru, en-us, en MIME-Version: 1.0 To: Caml List Subject: Re: [Caml-list] Omake [Was: Building large and portable projects] References: <3FBE45D2.5070309@cs.caltech.edu> <20031121185542.GC1154@gallu.homelinux.org> <3FBE67D5.5040704@cs.caltech.edu> <20031121213914.30fdfe0d.Damien.Pous@ens-lyon.fr> In-Reply-To: <20031121213914.30fdfe0d.Damien.Pous@ens-lyon.fr> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 damien:01 -pack:01 cmx:01 cmx:01 ocamlopt:01 -pack:01 ocamlc:01 ocamlc:01 ocamlopt:01 foo:01 626:99 invoke:01 cmo:01 cmo:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On 21.11.2003 12:39, Damien wrote: > I looked quickly at it, and tried to use for a project I am currently > working on, > > however my project uses "-pack" in order to pack some branches > (sub-directories) and avoid A_B_.._M module names. > > looking at Omakeroot, it seems to me there is no support for things like > that :-( > Has someone already managed to do it ? Didn't have time to write more about this earlier today, but it should be very simple. The following macro will probably work (haven't tested it myself) OcamlPack(dst, sources) = if $(and $(NATIVE_ENABLED) $(BYTECODE_ENABLED)) $(dst).cmo $(dst).cmx $(dst).cmi $(dst).o: $(addsuffix .cmo, $(sources)) $(addsuffix .cmx, $(sources)) $(addsuffix .o, $(sources)) $(addsuffix .cmi, $(sources)) $(OCAMLOPT) $(OCAMLOPTFLAGS) -pack -o $(dst).cmx $(addsuffix .cmx, $(sources)) $(OCAMLC) $(OCAMLCFLAGS)-pack -o $(dst).cmo $(addsuffix .cmo, $(sources)) else $(dst).cmo $(dst).cmi : $(addsuffix .cmo, $(sources)) $(addsuffix .cmi, $(sources)) $(OCAMLC) $(OCAMLCFLAGS)-pack -o $(dst).cmo $(addsuffix .cmo, $(sources)) $(dst).cmx $(dst).cmi $(dst).o: $(addsuffix .cmx, $(sources)) $(addsuffix .o, $(sources)) $(addsuffix .cmi, $(sources)) $(OCAMLOPT) $(OCAMLOPTFLAGS) -pack -o $(dst).cmx $(addsuffix .cmx, $(sources)) And then just invoke it using OcamlPack(foo, bar1 bar2 bar3 ... ) -- Aleksey Nogin Home Page: http://nogin.org/ E-Mail: nogin@cs.caltech.edu (office), aleksey@nogin.org (personal) Office: Jorgensen 70, tel: (626) 395-2907 ------------------- 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