From: Markus Mottl <mottl@miss.wu-wien.ac.at>
Message-Id: <199911242049.VAA06574@miss.wu-wien.ac.at>
Subject: Re: OCaml makefile template comments
To: David.Mentre@irisa.fr (David =?iso-8859-1?q?Mentré?=)
Date: Wed, 24 Nov 1999 21:49:50 +0100 (MET)
In-Reply-To: <wd8ogckqjuw.fsf@parate.irisa.fr> 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 calc.ml
RESULT = calc
THREADS = yes
-include $(OCAMLMAKEFILE)
---------------------------------------------------------------------------
For more infos, see:
http://miss.wu-wien.ac.at/~mottl/ocaml_sources/intro.html
Regards,
Markus
-- Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:28 MET