caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "David Allsopp" <dra-news@metastack.com>
To: "'Michael Grünewald'" <michael.grunewald@laposte.net>,
	"'OCaml users'" <caml-list@inria.fr>
Subject: RE: [Caml-list] A Tutorial on GNU Make with OCaml
Date: Fri, 21 May 2010 09:17:18 +0100	[thread overview]
Message-ID: <012101caf8be$085df350$1919d9f0$@romulus.metastack.com> (raw)
In-Reply-To: <4BF6179C.6050102@laposte.net>

Michael Grünewald wrote:
> Dear Jeff,
> 
> Jeff Shaw wrote:
> >
> > Dear OCamlers,
> > I spent quite a lot of time today getting better acquainted with GNU
> > make and decided I to share my experience and results. It's a bit on
> > the newbie friendly side of instruction.
> >
> > http://shawjeff.blogspot.com/2010/05/this-is-storytutorial-about-how-i
> > _20.html
> 
> ten years ago I learned GNU Make and found it awful to program. I had the
> feeling that it is nit meant to write complex (or mildly complex)
> makefiles.

I could be wrong about the way it's constructed, but I think you'll find
that the Linux kernel build system is *written* (rather than generated) in
GNU make cf. Managing Projects with GNU Make 3rd Ed pp. 218--228.

> Instead makefiles should be written by another program. I may
> be wrong but I think that GNU Make shines when it is used as part of the
> auto-tools chain, that you may also need to learn.

IMO users of auto-tools fall into two categories - users who need Makefiles
that work cross-platform (so package maintainers) and programmers who don't
regard the build system of their code as worth spending any time on. I
similarly 10 years ago (nearly) learned GNU make but my reaction was the
opposite to yours - I now have handwritten Makefiles for quite large
projects which build projects containing only OCaml but C, JavaScript, XHTML
templates and various other text files, maintain patches against 3rd party
libraries. The Makefile for my website is written in GNU make, runs
cross-platform and uses a parallel and distributed build system (distributed
only because it has to compile some programs on BSD and then pull them back
to Windows before uploading) with not an auto-tool in sight (assuming that
we're allowed dependency generators, of course). Granted, I spent a day
writing it but to me that's the divide - are you willing to spend the time
handcrafting a fully optimised (and possibly therefore faster) build system
or stick with something that takes a few seconds in an auto-tool.

> My personal taste goes rather to BSD Make (make in FreeBSD, bsdmake in OS-
> X and bmake in some other places): I found it much mor eeasy to program,
> and the FreeBSD build toolchain and ports collection provide a significant
> amount of Makefile techniques one can draws its inspiration from. I wrote
> my own macros for my OCaml projects.

So essentially you dislike make in general (bmake and gmake aren't *that*
different - though that said on BSD I always use gmake) - simply that on BSD
there are a large number of pre-written Makefiles and Makefile fragments
which allow you to produce your Makefiles more quickly.


David


  reply	other threads:[~2010-05-21  8:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-21  3:53 Jeff Shaw
2010-05-21  5:18 ` [Caml-list] " Michael Grünewald
2010-05-21  8:17   ` David Allsopp [this message]
2010-05-21  8:42     ` Michaël Grünewald
2010-05-21  8:28 ` Goswin von Brederlow

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='012101caf8be$085df350$1919d9f0$@romulus.metastack.com' \
    --to=dra-news@metastack.com \
    --cc=caml-list@inria.fr \
    --cc=michael.grunewald@laposte.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).