caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Marcin 'Qrczak' Kowalczyk" <qrczak@knm.org.pl>
To: skaller@users.sourceforge.net
Cc: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] Announcing the OMake build system version 0.9.1
Date: Sun, 05 Sep 2004 23:30:53 +0200	[thread overview]
Message-ID: <871xhgflo2.fsf@qrnik.zagroda> (raw)
In-Reply-To: <1094415146.3352.941.camel@pelican.wigram> (skaller@users.sourceforge.net's message of "06 Sep 2004 06:12:27 +1000")

skaller <skaller@users.sourceforge.net> writes:

> For interscript itself, the answer is no: it automatically extracts
> all sources no matter what you change.
>
> No dependency information is required, and no targets,
> and no makefile.

My makefiles generally include the following types of information:

- Rules which tell "how to compile a *.foo file into a *.bar file"
  and compiler options.

- Variable definitions which gather sources from contents of
  directories. It's usually "all files with a particular extension
  from subdirectories, plus some additions which are generated,
  minus some exceptions which are conditionally excluded".

- Rules which tell which sources and commands to use for many-to-one
  targets like programs and libraries, where source names are not
  derived from target names automatically because there are many
  sources.

- Administrative rules for things like "make clean" and "make install".

All this information is essential for building and impossible to infer
automatically from other files. Another build tool can't eliminate the
need of providing that information in some form. It can only provide a
different language for expressing it.

Dependencies between the source of module Foo which uses module Bar,
and the interface of module Bar, are generated automatically by tools
like ocamldep for particular languages.

> It does know (a) the set of LP sources, because you give it the
> first one on the command line and it follows includes.

If a source is missing, how does it know which program to run in order
to create it?

>> Assume that I forget that compilation of a particular file also reads
>> another included file, i.e. forget one dependency link. Then after
>> changing the included file, the target will not be rebuilt (I don't
>> believe that it will, because then all other targets are in the same
>> situation and everything would be rebuilt, which is impractical).
>> So *all* dependencies must be specified. Same as in make.
>
> You are missing the idea -- all the things are not only rebuilt
> every time (in principle) they're rebuilt AT LEAST TWICE.

So it's out for me. My project already takes 7 minutes to build
(90% of the time is gcc, which is slow on generated files having
hundreds of kilobytes). I don't want to turn it into 14 minutes
without a good reason.

And if I make small changes in one file in order to find some bug,
it's essential to recompile only a few relevant files. How does it
know which other files need to be rebuilt if it does not know *all*
dependencies? Rebuilding everything is out of the question. It should
take 7 seconds, not 7 minutes. And it does with make.

I can't say I like make, but any tool which requires to compile some
files twice, or insists on recompiling everything after a local change,
is not a viable alternative.

> As mentioned I personally don't bother with that in Felix package,
> I just use a hand coded linear order (one pass always converges) and
> check each object file against its *.ml file --

The project I have in mind, a compiler of my language Kogut, currently
has 90 modules in its library. I don't even keep the *set* of filenames
in a Makefile, because I would have to change it each time I add or
rename a module. Maintaining a topologically sorted list by hand would
be a nightmare.

It's not written in OCaml, so there are no issues with module order
for linking, but there are issues with slow compilation. So it's
important to compile only what is needed, and to not compile anything
twice.

> You will discover another source of recusive build
> dependencies if you try to bootstrap your language --

It's already self-hosting. The main compiler is written in the
language it compiles.

In order to build it you can either download a smaller package
containing only "real" sources, if you have an earlier version
installed, or download a larger package with pregenerated portable C
files of (a conservative approximation of) the part of the library
used by the compiler and the compiler proper. These C files are used
to bootstrap some working compiler, which is then used instead of the
"previous version".

> and especially if you *also* try to write the build
> tool that manages that in your language too .. :))

This is why I wrote the compiler driver in Perl :-)

It's the program which calls the actual compiler, C compiler,
assembler, assembler mangler (also written in Perl), and linker,
and finds out what options to give to each. It also generates
dependencies for make.

-- 
   __("<         Marcin Kowalczyk
   \__/       qrczak@knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/

-------------------
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:[~2004-09-05 21:31 UTC|newest]

Thread overview: 87+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-04 16:26 Jason Hickey
2004-09-04 17:42 ` Nicolas Cannasse
2004-09-04 18:27   ` chris.danx
2004-09-04 19:59     ` Matthieu Dubuget
2004-09-05  5:20       ` skaller
2004-09-05 13:20         ` David Brown
2004-09-05 14:31           ` skaller
2004-09-05 16:02             ` David Brown
2004-09-05 16:14               ` Nicolas Cannasse
2004-09-05 15:07           ` chris.danx
2004-09-05 15:53             ` skaller
2004-09-06  0:25               ` chris.danx
2004-09-06  8:17                 ` skaller
2004-09-05 13:38         ` Marcin 'Qrczak' Kowalczyk
2004-09-05 14:50           ` chris.danx
2004-09-05 15:01             ` Marcin 'Qrczak' Kowalczyk
2004-09-05 15:44               ` chris.danx
2004-09-05 16:10                 ` Marcin 'Qrczak' Kowalczyk
2004-09-05 17:38                   ` skaller
2004-09-05 17:15                 ` skaller
2004-09-05 16:11               ` skaller
2004-09-05 16:21                 ` Marcin 'Qrczak' Kowalczyk
2004-09-05 19:09                   ` skaller
2004-09-05 15:08           ` skaller
2004-09-05 15:38             ` Marcin 'Qrczak' Kowalczyk
2004-09-05 17:04               ` skaller
2004-09-05 18:45                 ` Marcin 'Qrczak' Kowalczyk
2004-09-05 20:12                   ` skaller
2004-09-05 21:30                     ` Marcin 'Qrczak' Kowalczyk [this message]
2004-09-05 22:41                       ` Brandon J. Van Every
2004-09-06 12:13                         ` Marcin 'Qrczak' Kowalczyk
2004-09-05 16:09             ` David Brown
2004-09-05 18:31               ` skaller
2004-09-06 10:56                 ` Andreas Rossberg
2004-09-06 15:51                   ` skaller
2004-09-06  7:11           ` Christian Lindig
2004-09-06 12:20             ` Marcin 'Qrczak' Kowalczyk
2004-09-06 14:12               ` Christian Lindig
2004-09-06  1:06         ` Richard Jones
2004-09-06  1:50           ` Brandon J. Van Every
2004-09-06  9:09             ` skaller
2004-09-06  8:59           ` skaller
2004-09-04 23:58     ` Nicolas Cannasse
2004-09-05  1:18       ` james woodyatt
2004-09-05  1:26         ` [Caml-list] Perl Conjury (alternative to Unix make) james woodyatt
2004-09-05  2:03         ` [Caml-list] Announcing the OMake build system version 0.9.1 David Brown
2004-09-05  2:37           ` james woodyatt
2004-09-05  6:24             ` Nathaniel Gray
2004-09-05 20:38         ` Aleksey Nogin
2004-09-06  0:12           ` james woodyatt
2004-09-06  0:33             ` [Omake] " Aleksey Nogin
2004-09-06  3:54               ` Brian Hurt
2004-09-06  6:39                 ` Jason Hickey
2004-09-06  8:10                   ` james woodyatt
2004-09-06  7:50                 ` [Omake] " Erik de Castro Lopo
2004-09-06 14:52                   ` Brian Hurt
2004-09-06 17:20                     ` skaller
2004-09-06  9:52                 ` skaller
2004-09-06 15:10                   ` Brian Hurt
2004-09-07 13:26                 ` David Brown
2004-09-06  1:14             ` Brandon J. Van Every
2004-09-06  2:35             ` Jacques GARRIGUE
2004-09-06  9:38               ` skaller
2004-09-06 11:34                 ` Jacques Garrigue
2004-09-06 16:28                   ` skaller
2004-09-06 16:42                     ` Christopher A. Watford
2004-09-06 16:59                       ` Richard Jones
2004-09-07  2:21                     ` Jacques GARRIGUE
2004-09-07  6:17                       ` skaller
2004-09-07  8:24                         ` Benjamin Geer
2004-09-07 13:35                     ` David Brown
2004-09-06  7:51             ` Daniel Andor
2004-09-05 20:38   ` Aleksey Nogin
2004-09-05 22:57     ` Olivier Grisel
2004-09-06  0:17       ` Aleksey Nogin
2004-09-06 13:31         ` Olivier Grisel
2004-09-06 19:28           ` [Caml-list] Godi for OMake [Was: Announcing the OMake build system version 0.9.1] Aleksey Nogin
2004-09-06 20:18             ` Olivier Grisel
     [not found]               ` <41537DAE.1050601@cs.caltech.edu>
2004-09-24 13:50                 ` Olivier Grisel
2004-09-24 18:37                   ` [Caml-list] OCamlFind support in OMake [Was: Godi for OMake] Aleksey Nogin
2004-09-04 18:01 ` [Caml-list] Announcing the OMake build system version 0.9.1 Yaron Minsky
2004-09-05  1:38   ` Eray Ozkural
2004-09-05  6:12 ` Yamagata Yoriyuki
2004-09-05 12:48   ` Yaron Minsky
2004-09-05 20:39     ` Aleksey Nogin
2004-09-06 12:24 Jason Smith
2004-09-06 15:54 ` Christopher A. Watford

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=871xhgflo2.fsf@qrnik.zagroda \
    --to=qrczak@knm.org.pl \
    --cc=caml-list@inria.fr \
    --cc=skaller@users.sourceforge.net \
    /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).