caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Aleksey Nogin <nogin@cs.caltech.edu>
To: Nicolas Cannasse <warplayer@free.fr>, Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] Announcing the OMake build system version 0.9.1
Date: Sun, 05 Sep 2004 13:38:28 -0700	[thread overview]
Message-ID: <413B7944.5010807@cs.caltech.edu> (raw)
In-Reply-To: <001e01c492a6$872c7280$19b0e152@warp>

On 04.09.2004 10:42, Nicolas Cannasse wrote:

> Other way to ask the question : what features make the OMake language better
> than OCaml for writing Makefiles ? Or is it just syntactic sugar ?

It's not about language, it's about the features that the build system 
provides. Here is a list of features of omake that I think would be hard 
or impossible to reproduce in a "Makefile generator":

- Omake knows that a single build command can produce more that one 
file! (Think omcamlopt producing both .cmx and .o, or ocamlc on an 
.mli-free .ml producing both .cmo and .cmi). This really simplifies life 
as you do not have to hack around your build system not knowing the 
side-effects of commands you invoke. See also the "Quick example" below.

- Persistent filesystem monitoring (based on FAM) mode - in this mode, 
as soon as one of the source files is changed, the build is process is 
restarted accordingly (whether omake was idle or already building 
something in the project). In my experience this significantly speeds up 
the process of fixing typos, type checking errors, etc.

- As already mentioned by Yaron, the commands for building a file are 
themselves included in the dependency for the file.

- Complete timestamp/MD5sum testing for file modifications. Note that 
once you make the dependency information truly complete (which is the 
goal of omake), then this becomes a must. Often not all changes in a 
dependencies result in the generated file being actually changed. When a 
file stays the same after it is rebuilt, you want to detect this to 
avoid rebuilding too much.

- Being able to specify "dependencies of dependencies". In other words, 
not only you can specify how to scan a file for dependencies (e.g. 
ocamldep, "gcc -MM", etc), but you can also specify what the scanning 
process itself depends on. For example, if you have a custom 
ocamldep-like program, then you can specify that it needs to be built 
before scanning dependencies of certain files and that whenever that 
binary changes, the dependencies of those files need to be recomputed.

- A global view of the whole project (not just per-directory). This not 
only helps in making sure that the dependency graph is as complete as 
possible, but also gives the parallelizer (omake supports the same -j 
option as make) more freedom. Of course, in a "Makefile generator" you 
could try to generate one huge Makefile for a project, but even with 
such a file if you ever end up calling make recursively, it will no 
longer have a complete view of the whole project.

- Quick example: suppose that you have a file "foo.ml" (with no foo.mli) 
and a file "bar.ml" that refers to "Foo" and supposed that you are 
compiling bytecode. The standard ocamldep would generate

foo.cmo: bar.cmo

dependency. Which means that whenever bar.ml changes, foo.cmo (and 
everything that depends on it) will get rebuilt.

In omake's case, our version of ocamldep will generate the "proper"

foo.cmo: bar.cmi

Then, omake's rule for building .cmi specifies that in the absence of an 
.mli file (and when no rule for building such an .mli is present), use 
"ocamlc %.ml" for building the .cmi. Next, omake will check whether .cmi 
have changed (compared to what it was the last time omake compiled it, 
not compared to what it was right before!) and if not (imagine that 
you've change the code in .ml without affecting the signature - bar.cmo 
would change, but bar.cmi would not), then foo.cmo will not get rebuilt.

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


  parent reply	other threads:[~2004-09-05 20:38 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
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 [this message]
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=413B7944.5010807@cs.caltech.edu \
    --to=nogin@cs.caltech.edu \
    --cc=caml-list@inria.fr \
    --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).