[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Nicolas Pouillard <nicolas.pouillard@g...> |
| Subject: | Re: [Caml-list] ocamlbuild: change the target name |
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