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 UAA11467; Fri, 21 Nov 2003 20:30:34 +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 UAA11320 for ; Fri, 21 Nov 2003 20:30:32 +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 hALJUV106071 for ; Fri, 21 Nov 2003 20:30:31 +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 hALJUTkx006232; Fri, 21 Nov 2003 11:30:29 -0800 Message-ID: <3FBE67D5.5040704@cs.caltech.edu> Date: Fri, 21 Nov 2003 11:30:29 -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: sylvain.le-gall@polytechnique.org, Caml List CC: skaller@ozemail.com.au Subject: [Caml-list] Omake [Was: Building large and portable projects] References: <3FBE45D2.5070309@cs.caltech.edu> <20031121185542.GC1154@gallu.homelinux.org> In-Reply-To: <20031121185542.GC1154@gallu.homelinux.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Loop: caml-list@inria.fr X-Spam: no; 0.00; le-gall:01 camlp:01 camlp:01 zoggy:01 ocamlflags:01 -pp:01 zoggy:01 cmx:01 ocamlc:01 ocamlopt:01 cmx:01 helper:01 ocamlflags:01 -pp:01 bugzilla:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On 21.11.2003 10:55, sylvain.le-gall@polytechnique.org wrote: > Is there way to define camlp4 syntax ? ( for example XXX.ml needs camlp4 > with cmo zoggy.cmo or something like that ) Yes, the syntax would be something like if true OCAMLFLAGS += -pp "camlp4 zoggy.cmo" XXX.cmx XXX.o: XXX.cmo: The idea is the following: - variables inside the "if" statements are locally scope (unless you explicitly export the variable environment back to the parent scope), so we use the "if true" as a synonym for "local". So, the above tells omake to add a preprocessor flag to ocamlc/ocamlopt when compiling XXX.cmx, XXX.o and XXX.cmo. Alternatively, you could define a helper macro: UseCamlp4(modules, files) = OCAMLFLAGS += -pp "camlp4 $(addsuffix .cmo, $(modules))" $(addsuffix .cmx, $(modules)) $(addsuffix .o, $(modules)): $(addsuffix .cmo, $(modules)): UseCamlp4(zoggy, XXX) Actually, it might be a good idea to add such a macro to the global rules file included with omake - I filed http://cvs.metaprl.org:12000/bugzilla/show_bug.cgi?id=119 on this. > Is there a kind of configure in it ? There are a number of mechanisms for hooking to an external one. For example, you could specify dependencies and commands when including file as: .INCLUDE: foo bla bla > foo .INCLUDE: foo: foo.in bla bla bla bla < foo.in > foo The above tell omake that - it should include foo and if the file does not exist, it should use "bla bla" to generate it. Next, it should check whether foo is newer than foo.in and generate foo again (using "bla bla blah blah" this time) and then include it again. You can also specify dependencies for the OMakefile itself: if $(not $(equal $(OSTYPE), Win32)) OMakefile: OMakefile.in config.status @echo "*** Build system is out-of-date, rebuilding ***" $(DOT)config.status @echo "*** OMakefile was rebuilt, session should restart ***" > Can you use META files. Not sure what those are. On 21.11.2003 08:12, skaller wrote: > But it is much worse. A target can > depend on itself. Interscript assumes that. > An example is a Latex build, which depends > on auxilliary files generated by the build > [Ocamldoc output can take 4 passes to fixate > for example]. Well, we are hoping to support those in omake (still work in progress) - http://cvs.metaprl.org:12000/bugzilla/show_bug.cgi?id=86 -- 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