caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: skaller <skaller@ozemail.com.au>
To: sylvain.le-gall@polytechnique.org
Cc: Nicolas Cannasse <warplayer@free.fr>,
	David Brown <caml-list@davidb.org>,
	Martin Jambon <martin_jambon@emailuser.net>,
	caml-list@inria.fr
Subject: Re: [Caml-list] Building large and portable projects
Date: 22 Nov 2003 03:12:48 +1100	[thread overview]
Message-ID: <1069431167.5426.45.camel@pelican> (raw)
In-Reply-To: <20031121064950.GA836@gallu.homelinux.org>

On Fri, 2003-11-21 at 17:49, sylvain.le-gall@polytechnique.org wrote:
> On Fri, Nov 21, 2003 at 02:48:17PM +0900, Nicolas Cannasse wrote:

> On the other hand the aim will be to have a self contained tools ( ie
> when you write a makefile you use rm, cp, touch
> .. here the aims will be
> to have it in ocaml ). So you could build on every platform which
> support ocaml.

The goal is impossible. For example, all my Ocaml
source is literate programmed. You surely aren't
going to rewrite Interscript in Ocaml are you?

At best, you can cheat with system() function
but then all the dependency checking is lost.

Make systems are all conceptually wrong.
There a huge number of projects to replace
Make (and autoconf et al) and not a single
one I've seen recognizes that the fundamental
design is flawed .. instead they all try to
copy the make idea.

First observe that building a system
is a process where it is not always
possible to determine the full sequence
of commands in advance. Sometimes,
you have to perform some action before
you can decide what to do next.

Example: you cannot build interscript
packaged sources or a tarball directly,
you have to extract the contents first.

Example: the rules for building a package
may have to be generated or extracted
from the package.

Next observe that the linear dependency
checking is naive. First, what some
target depends on can be conditional:
obviously true for C :-)

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

This leads to the first novel idea. Fixpoints.
Interscript is based on that idea.

With fixpoints, you dont CARE about dependencies.
What you do is repeatedly execute some process
until the defined outputs are stable. The inputs
do not need to be known.

Now we backstep. We try to *predict* whether
the outputs will be the same this run as last.
If we can -- and we have to be *sure* -- we
can terminate one cycle earlier.

This is dependency checking with a new twist:
its optional. :-)

Well, I will jump ahead now. A build system
does NOT have targets. That's a bad idea too.

A build systems has processes and files.
Lets call the processes ARROWS and the files OBJECTS.

Oh. That's a category. We allow of course,
products of files (multiple outputs and inputs)
and sums of files (choose one of several).
[And of course we'd better make it cartesian
closed and allow processes to be files .. 
called scripts .. :]

The control system allows you to 'click' on
an arrow to execute the process. This is manual
running. It also allows to to click on a object
to run all the processes required to produce
the object. By using a caching concept, some
process can be elided as an optimisation.

For example .c -cc--> .o -link--> exe, we can 
use the cached .o instead of running cc on the
.c provided the .c is older.

BTW: I have *built* this system, including
a graphic interface which allowed construction
of the build category.

I needed this much power. Make is a total joke.
What I was doing was writing a book, literate
programmed of course, and needed to generate
a LOT of different documents -- I had to build
code, test it, capture the output, typeset
the book, build indices, contents ...

In a *real* build system, you do NOT want
to make everything from scratch everytime.
Sometime you're happy using old data,
at least for a while.

Anyhow .. a lot of new ideas for a build
system are here. Just copying the make concept
is not going to solve any problems .. its going
to make things much WORSE by having yet another
inadequate tool -- which of course the poor client
will have to build, making the tool chain even longer.
[Trying to replace Make destroyed Boost IMHO]



-------------------
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 17:13 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-20 18:47 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 [this message]
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
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=1069431167.5426.45.camel@pelican \
    --to=skaller@ozemail.com.au \
    --cc=caml-list@davidb.org \
    --cc=caml-list@inria.fr \
    --cc=martin_jambon@emailuser.net \
    --cc=sylvain.le-gall@polytechnique.org \
    --cc=warplayer@free.fr \
    /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).