caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: <sylvain.le-gall@polytechnique.org>
To: Aleksey Nogin <nogin@cs.caltech.edu>
Cc: Caml List <caml-list@inria.fr>, skaller@ozemail.com.au
Subject: Re: [Caml-list] Omake [Was: Building large and portable projects]
Date: Sat, 22 Nov 2003 00:48:59 +0100	[thread overview]
Message-ID: <20031121234859.GA1317@gallu.homelinux.org> (raw)
In-Reply-To: <3FBE67D5.5040704@cs.caltech.edu>

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


  parent reply	other threads:[~2003-11-21 23:49 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-20 18:47 [Caml-list] Building large and portable projects Martin Jambon
2003-11-20 19:56 ` sylvain.le-gall
2003-11-21  1:45   ` Nicolas Cannasse
2003-11-21  5:25     ` David Brown
2003-11-21  5:48       ` Nicolas Cannasse
2003-11-21  6:45         ` David Brown
2003-11-21  6:49         ` sylvain.le-gall
2003-11-21 16:12           ` skaller
2003-11-21 17:53             ` Eric Dahlman
2003-11-22 14:45               ` skaller
2003-11-21 19:04             ` sylvain.le-gall
2003-11-22 14:34               ` skaller
2003-11-22 18:50                 ` sylvain.le-gall
2003-11-22 14:32             ` Martin Berger
2003-11-22 14:55               ` skaller
2003-11-22 17:08             ` David Brown
2003-11-22 16:48               ` skaller
2003-11-23  3:25               ` Nicolas Cannasse
2003-11-23  4:29                 ` David Brown
2003-11-23 17:21                 ` skaller
2003-11-22 17:13             ` David Brown
2003-11-24 18:02             ` Ken Rose
2003-11-24 19:04               ` Christian Lindig
2003-11-21 16:32           ` Martin Jambon
2003-11-21 18:57             ` sylvain.le-gall
2003-11-21  9:14       ` Christian Lindig
2003-11-21  9:28 ` Richard Jones
2003-11-21 15:35 ` skaller
2003-11-21 17:05 ` Jason Hickey
2003-11-21 18:55   ` sylvain.le-gall
2003-11-21 19:30     ` [Caml-list] Omake [Was: Building large and portable projects] Aleksey Nogin
2003-11-21 20:39       ` Damien
2003-11-22  3:30         ` Aleksey Nogin
2003-11-21 23:48       ` sylvain.le-gall [this message]
2003-11-22  1:32         ` Nicolas Cannasse
2003-11-22  3:51         ` Aleksey Nogin
2003-11-28 16:29   ` [Caml-list] Building large and portable projects David Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031121234859.GA1317@gallu.homelinux.org \
    --to=sylvain.le-gall@polytechnique.org \
    --cc=caml-list@inria.fr \
    --cc=nogin@cs.caltech.edu \
    --cc=skaller@ozemail.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).