caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Aleksey Nogin <nogin@cs.caltech.edu>
To: sylvain.le-gall@polytechnique.org, Caml List <caml-list@inria.fr>
Cc: skaller@ozemail.com.au
Subject: [Caml-list] Omake [Was: Building large and portable projects]
Date: Fri, 21 Nov 2003 11:30:29 -0800	[thread overview]
Message-ID: <3FBE67D5.5040704@cs.caltech.edu> (raw)
In-Reply-To: <20031121185542.GC1154@gallu.homelinux.org>

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


  reply	other threads:[~2003-11-21 19:30 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     ` Aleksey Nogin [this message]
2003-11-21 20:39       ` [Caml-list] Omake [Was: Building large and portable projects] Damien
2003-11-22  3:30         ` Aleksey Nogin
2003-11-21 23:48       ` sylvain.le-gall
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=3FBE67D5.5040704@cs.caltech.edu \
    --to=nogin@cs.caltech.edu \
    --cc=caml-list@inria.fr \
    --cc=skaller@ozemail.com.au \
    --cc=sylvain.le-gall@polytechnique.org \
    /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).