Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] creating multiple executables with OcamlMakefile
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Markus Mottl <markus@m...>
Subject: Re: [Caml-list] creating multiple executables with OcamlMakefile
On Sat, 06 Oct 2001, Jeremy Fincher wrote:
> I have a body of code from which I'd like to compile several
> executables.  What's the best way to do this with the OcamlMakefile?

It's not particularly well-suited for this purpose. The best (or at
least cleanest) solution probably is to have a separate Makefile for each
target kind and to use "make -f" to specify the needed one. On the command
line this can be handled elegantly with shell aliases, in Makefiles or
scripts it does not really hurt to write out the name anyway. You can
also try the "meta rule"-approach as in the "threads"-example in the
OcamlMakefile-distribution, but it's really a bit messy to specify two
projects (or target kinds) in one file.

Markus Mottl

Markus Mottl                                   
Austrian Research Institute
for Artificial Intelligence        
Bug reports:  FAQ:
To unsubscribe, mail  Archives: