Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Christian Rinderknecht <rinderkn@caesar.elte.hu>
To: William R <r.3@libertysurf.fr>, caml-list@inria.fr
Subject: Re: [Caml-list] [ANN] Announcing yet another Makefile for OCaml
Date: Wed, 22 Jan 2014 20:22:30 +0100	[thread overview]
Message-ID: <52E01A76.7050109@caesar.elte.hu> (raw)
In-Reply-To: <52DF76A5.1020805@libertysurf.fr>

[-- Attachment #1: Type: text/plain, Size: 3011 bytes --]

Dear William and list members,

On 01/22/2014 08:43 AM, William R wrote:
> could you explain differences  with OCamlMakefile

This is a fair question, since Markus' work has been around for quite
a while, but I am afraid that I never used it. Nevertheless, I went
through the documentation and the source code and here are the main
differences I can see at the moment (my apologies to Markus if I am
mistaken):

OCamlMakefile vs my Makefile
   * User specifies SOURCES and RESULT vs optional OBJ and BIN
   * Order of linking must be specified vs optional
   * Builds library and toplevels vs none
   * Supports -pack/-for-pack and profiling vs none
   * Preprocessors in special comments, no command-line options per
     source file vs one tag file per source file + global options
   * Generates documentation vs none
   * Subprojects vs mono-project
   * Support for ocamlfind vs none
   * Included in another Makefile vs includes another Makefile
   * One native code compilation vs two
   * 1300 lines vs 830 lines
   * Plethora of phony targets vs two
   * Short documentation vs long

OCamlMakefile supports more features than I do, although I use tag
files à la ocamlbuild. This is not surprising, as my makefile was not
developed to cover many use-cases, just mine and those of
beginners. Accordingly, I put an extreme emphasis on different issues,
like having the laziest makefile possible: it works a lot in order to
compile as little as possible and requires the programmer to configure
as little as possible. The output on the terminal is entirely
generated by the Makefile, not by the tools it calls, and, if
available, it leverages the --output-sync option of GNU Make 4.0 to
keep everything readable while using parallelism. Also, there is an
impact analysis in case of errors, so there are no redundant error
messages (one error implying another in another module) and no useless
recompilations (bound to fail). Another feature is that my makefile
keeps track of source deletions, which are a major source of
inconsistencies, while updating compilation dependencies locally, and,
generally speaking, the main design principle is that you should
*never* have to do [make clean] if you don't really want to (the only
case where you should is compiling to native code when maximising
cross-module optimisations and inlining).

> why not contribute to this  project if you introduced compatible
 > clever ideas ?

OCamlMakefile and my Makefile address different crowds, but these can
actually benefit from each other, you are right. I will keep that in
mind, but before I add more features à la OCamlMakefile, or the other
way around, I would like to have bug reports.

You can simply try my makefile by putting it in a single-directory
project and setting BIN to the main module's basename in
Makefile.cfg. (Each file requiring camlp4 or special options for
certain tools require a tag file. See Makefile.man)

Best regards,

Christian

PS I did not know about obuild. I will have a look at it.


[-- Attachment #2: Type: text/html, Size: 3926 bytes --]

  reply	other threads:[~2014-01-22 19:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-22  1:03 Christian Rinderknecht
2014-01-22  7:43 ` William R
2014-01-22 19:22   ` Christian Rinderknecht [this message]
2014-01-22 23:30     ` John Whitington
2014-01-23  0:08       ` Christian Rinderknecht
2014-01-23  9:35     ` Goswin von Brederlow
2014-01-23 10:36       ` Malcolm Matalka
2014-01-23 14:47       ` Christian Rinderknecht
2014-01-24 16:18       ` Christian Rinderknecht

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=52E01A76.7050109@caesar.elte.hu \
    --to=rinderkn@caesar.elte.hu \
    --cc=caml-list@inria.fr \
    --cc=r.3@libertysurf.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