English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Re: OCaml makefile template comments
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1999-11-24 (22:23)
From: Markus Mottl <mottl@m...>
Subject: Re: OCaml makefile template comments
>     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:


Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl