Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Announcing the OMake build system version 0.9.1
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] Announcing the OMake build system version 0.9.1
On Mon, 2004-09-06 at 02:10, Marcin 'Qrczak' Kowalczyk wrote:
> "chris.danx" <chris.danx@ntlworld.com> writes:
> 
> >> But how does it know it? How to specify that in a different way than
> >> for make?
> >
> > Isn't that information encoded in the source files already?
> 
> It's not encoded in an automatically extractable way. For example a
> Perl script in my project includes a statement
>    open TABLES, ">char-tables.c";
> but I don't expect a build tool to understand Perl and deduce that
> this script should be run to remake char-tables.c.

Oh yes it does :)

This is exactly what interscript DOES know how to do.
Here is something similar, since I can't read Perl:

@TABLES = ["Hello", "World"]
@h = tangler("char-tables.c")
@select(tangler)
@for i in TABLES: tangle(i)

This actually writes Hello World into the c file, its just
Python with @ at the front so the parser doen't confuse
it with text.

If you change the TABLES, a new c file is created --
and interscript knows about it too (because the tangler
function creates a tracked output sink ..)

The only caveat here is: if you use a foreign script
to write a file, interscript won't know about the file.
If you use embedded Python, it does (provided you use
an appropriate output object).

> And it will not know that sources in one subdirectory should be
> compiled using one compiler (the previous version) and sources in
> another using another (bootstrapped version of the same compiler).

It doesn't have to. It isn't a declarative system.
It doesn't have to know how to compile files in one
directory or the other.. it just executes the build
commands you give it.

> And it will not know the language of the sources to infer dependencies
> from them.

That isn't true either. It actually does know many languages,
and you can plug in another if you want to.

None of the tanglers I wrote actually bother to track
dependencies but you could do it.

The tanglers are mainly used to insert appropriate
#line directives, but they can do other things.
In particular the Perl tangler also understands perldoc,
and the Python tangler can pretty print using coloured
keywords.

The thing is -- you don't need to know the dependencies.
It helps, but it isn't necessary.

> So, how would I specify how files should be processed?

The usual way -- write the commands out.

-- 
John Skaller, mailto:skaller@users.sf.net
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net



-------------------
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