Re: OCaml makefile template comments

From: Markus Mottl (
Date: Wed Nov 24 1999 - 21:49:50 MET

From: Markus Mottl <>
Message-Id: <>
Subject: Re: OCaml makefile template comments
To: (David =?iso-8859-1?q?Mentré?=)
Date: Wed, 24 Nov 1999 21:49:50 +0100 (MET)
In-Reply-To: <> from "David =?iso-8859-1?q?Mentré?=" at Nov 24, 99 11:12:07 am

> Does anybody know a good makefile model to compile in subdirs
> (without recursive makefile) for OCaml?

Is there a particular reason for objecting to recursive makefiles?
Actually, projects that are spread over several directories have always
been a bit awkward to handle with the traditional "make". The easiest
solution is in most cases to have a specialized makefile in each directory,
which possibly makes use of some "meta-makefile".

I am not sure whether you have tried "OcamlMakefile" before (it strongly
relies on recursive invocation), but it has so far been appropriate for
just about any project I have undertaken. In general, the specialized
makefiles only require a few (=5-10) lines of code.

Here an example from the distribution:

  OCAMLMAKEFILE = ../OcamlMakefile

  SOURCES = test_impl.c test.idl parser.mly lexer.mll
  RESULT = calc
  THREADS = yes

  -include $(OCAMLMAKEFILE)

For more infos, see:


Markus Mottl,,

This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:28 MET