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
[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: 2001-10-06 (20:39)
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                                             markus@oefai.at
Austrian Research Institute
for Artificial Intelligence                  http://www.oefai.at/~markus
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr