Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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:
  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