caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Markus Mottl <markus@oefai.at>
To: Kenneth Knowles <kknowles@uclink.berkeley.edu>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] [ANNOUNCE] Development versions: ocamlconf, ASPCC
Date: Thu, 11 Mar 2004 12:09:26 +0100	[thread overview]
Message-ID: <20040311110926.GB16253@fichte.ai.univie.ac.at> (raw)
In-Reply-To: <20040303014757.GA23400@tallman.kefka.frap.net>

On Tue, 02 Mar 2004, Kenneth Knowles wrote:
> *	OcamlMakefile is awkward with multiple targets (such as suites
>	of utilities) and I'd rather write (or depend on) a simple ocaml
>	script than a complex Makefile

I have taken this criticism as motivation to make OCamlMakefile more
useful with subprojects (i.e. multiple targets).  The newest release is
now available and should make this task much simpler.

Here is an example from the distribution on how to specify two
subprojects:

---------------------------------------------------------------------------
# Set OCamlMakefile to use
export OCAMLMAKEFILE = ../OCamlMakefile

# Export some common variable settings
export THREADS = yes

# Define project "ex1"
export PROJ_ex1 = \
  SOURCES=ex1.ml \
  RESULT=ex1

# Define project "ex2"
export PROJ_ex2 = \
  SOURCES=ex2.ml \
  RESULT=ex2

# If the environment does not define subprojects to handle,
# then use "ex1 ex2" as default
ifndef SUBPRJS
  export SUBPRJS = ex1 ex2
endif

# Default target to use
all:    bc

# Catch-all target will be applied to all subprojects automatically
%:
        @make -f $(OCAMLMAKEFILE) subprjs SUBTARGET=$@
---------------------------------------------------------------------------

You can use the usual shortcuts like "make nc" (= build native code),
etc., for compiling several subprojects at once.  Setting/exporting
variable "SUBPRJS" in the shell environment or passing it to "make"
on the command line allows you to refer to any subset of your projects
that should be affected by the next command.  I think this is as easy
as things can get - but feel free to send me suggestions for improvement!

Regards,
Markus

-- 
Markus Mottl          http://www.oefai.at/~markus          markus@oefai.at

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


      parent reply	other threads:[~2004-03-11 11:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-03  1:47 Kenneth Knowles
2004-03-03  5:16 ` Issac Trotts
2004-03-03  6:25   ` Kenneth Knowles
2004-03-03 19:53     ` Issac Trotts
2004-03-03 23:06       ` Kenneth Knowles
2004-03-03 19:56     ` David MENTRE
2004-03-03 20:29       ` Issac Trotts
2004-03-03 22:36         ` Kenneth Knowles
2004-03-11 11:09 ` Markus Mottl [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040311110926.GB16253@fichte.ai.univie.ac.at \
    --to=markus@oefai.at \
    --cc=caml-list@inria.fr \
    --cc=kknowles@uclink.berkeley.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).