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 AAA21057; Sat, 22 Nov 2003 00:49:08 +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 AAA21066 for ; Sat, 22 Nov 2003 00:49:07 +0100 (MET) Received: from smarthost1.mail.easynet.fr (smarthost1.mail.easynet.fr [212.180.1.68]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id hALNn6118023 for ; Sat, 22 Nov 2003 00:49:06 +0100 (MET) Received: from [212.180.39.62] (helo=gros) by smarthost1.mail.easynet.fr with esmtp (Exim 3.35 #1 (Debian)) id 1ANL1N-0002pT-00; Sat, 22 Nov 2003 00:49:05 +0100 Received: from [192.168.0.11] (helo=ptit.gallu.homelinux.org) by gros with esmtp (Exim 3.36 #1 (Debian)) id 1ANL1N-0000fW-00; Sat, 22 Nov 2003 00:49:05 +0100 Received: from gildor by ptit.gallu.homelinux.org with local (masqmail 0.2.20) id 1ANL1H-0NN-00; Sat, 22 Nov 2003 00:48:59 +0100 Date: Sat, 22 Nov 2003 00:48:59 +0100 To: Aleksey Nogin Cc: Caml List , skaller@ozemail.com.au Subject: Re: [Caml-list] Omake [Was: Building large and portable projects] Message-ID: <20031121234859.GA1317@gallu.homelinux.org> References: <3FBE45D2.5070309@cs.caltech.edu> <20031121185542.GC1154@gallu.homelinux.org> <3FBE67D5.5040704@cs.caltech.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3FBE67D5.5040704@cs.caltech.edu> User-Agent: Mutt/1.5.4i From: X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 le-gall:01 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 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello, again On Fri, Nov 21, 2003 at 11:30:29AM -0800, Aleksey Nogin wrote: > 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 > Ok. But i am looking for something included in it ( think that in your very large project, you have a library that builds against an external one, i want that the makefile system detect it and output that it needs this library... ). > > 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 ***" In fact i want to get rid of it ( no $(DOT)config.status ). Autools et al are very well made but i think that it is too much complicated ( having try to understand how it is build but most of the time i really can t get into it ). > > >Can you use META files. > > Not sure what those are. > META file comes with findlib. Findlib is an helper to configure ocaml compilation : ocamlfind ocamlc -package "fileutils" xxx.ml will run ocamlc -I /usr/lib/ocaml/fileutils ... Gerd Stolpmann write it ( www.ocaml-programming.de ). Sorry to the author if i mistyped his name... I take a quick glance to you OMakefile... Well i think it is very powerfull and very interesting... But ( there is always a but ), i am looking for something between your very complete suite and ocamake which is light and permits to do fast job for ocaml stuff. I know, i will run into problem if not targeting all people... But, i cannot choose all options. I want something enough powerfull to build little to medium ocaml project -- with some C binding. I don't want to rebuild make. The ideal project ( in size ) will be cameleon ( fully written in ocaml ) or mldonkey ( mostly ocaml with some C ). I don't really want to be able to compile C, python, Ada... I want to use some kind of ocaml script ( let say makefile.ml which will contain the instruction to build, explains the dependency etc ) to enable user to be fully consistent with their project ( they learn ocaml and not makefile syntax ). I think it should be necessary to have a plugin system ( through dynlink or topfind, don't know yet ) to enable them to develop their own set of rules ( if they want to compile specific things ). What i have read in you omakefile is a kind of full rewrite of make ( ie you have construct of function, dependency etc ). I precisely don't want to develop my own langage for this purpose, i want to have it written in ocaml. Just to give you an example, all the student i know have problem using makefile because they don't want to spend two hours understanding this big script... So they simply don't use it... How many times i have seen one-file-project without makefile, or people using "ocamlc X.ml && ocamlc Y.ml && ocamlc Z.ml..." I want ( just as i have posted before ) : let my_prog = { name = "my_prog";...;toplevels = [ "X.ml" ] } in add_target my_prog and that's all. And i want to be able to do it on linux or win without being needed to do if Win32 then ... else ... ( every time you write if ... else ..., it is a possible infinite source of error ). I will have a deeper look to your omakefile ( understanding how it is working, if i can learn from the rules to target process ... ). thanks for having helped me to find more project similar to mine. Kind regard Sylvain LE GALL ps : i cannot find your project omakefile on humps pps : if you have time you could take a look at cameleon CVS, branch findlib : http://savannah.nongnu.org/projects/cameleon, there is a bunc of ten lines makefile which are sufficient to define what to compile for each directory... That is the mininum sums of information i want user to give to have a fully working makefile system ------------------- 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