Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "Nicolas Pouillard" <nicolas.pouillard@gmail.com>
To: Paolo Donadeo <p.donadeo@gmail.com>
Cc: "O'Caml Mailing List" <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] ocamlbuild: change the target name
Date: Mon, 17 Sep 2007 15:04:53 +0200	[thread overview]
Message-ID: <1190033826-sup-9595@ausone.inria.fr> (raw)
In-Reply-To: <4b5157c30709140245ud523bafj14a6aa300290cf3f@mail.gmail.com>

Excerpts from Paolo Donadeo's message of Fri Sep 14 11:45:09 +0200 2007:
> I'm porting the build system of Ex-nunc from a plethora of makefiles
> to ocamlbuild.
> 
> Is it possible to change the name of the generated (bytecode or
> native) executable name? The Ex-nunc page compiler has a main module
> contained in the file (try to guess) mail.ml. Using:
> 
> $ ocamlbuild ...some options... main.byte
> 
> the program is correctly compiled and named main.byte, but I would
> prefer the output was called "xnuncc".
> 
> Now I use the mv command, but it's not the best solution.

There is many ways to do this kind of things.

1/  Rename your main.ml into xnuncc.ml and then accept to keep xnuncc.byte and
xnuncc.native names.

2/  Add  a  rule  to  myocamlbuild.ml  to  say  that  on can build xnuncc from
main.byte and that's just a copy.

...
copy_rule "The xnuncc binary" "main.byte" "xnuncc";;
...

The  problem  with this method is that the xnuncc file only live in the _build
directory. You have to manually copy it to install it.

3/  Use a script around ocamlbuild that make a link or a copy for you.

It's  mainly  a  matter  of installing things with ocamlbuild, that is a point
not really treated for now.

Best regards,

-- 
Nicolas Pouillard aka Ertai


  reply	other threads:[~2007-09-17 13:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-14  9:45 Paolo Donadeo
2007-09-17 13:04 ` Nicolas Pouillard [this message]
2007-09-17 16:31   ` [Caml-list] " skaller

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=1190033826-sup-9595@ausone.inria.fr \
    --to=nicolas.pouillard@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=p.donadeo@gmail.com \
    /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