From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id CE7A8BC6B for ; Mon, 17 Sep 2007 15:04:23 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAJcY7kbAXQImh2dsb2JhbACOFgkKJw X-IronPort-AV: E=Sophos;i="4.20,264,1186351200"; d="scan'208";a="16313700" Received: from discorde.inria.fr ([192.93.2.38]) by mail4-smtp-sop.national.inria.fr with ESMTP; 17 Sep 2007 15:05:21 +0200 Received: from ausone.inria.fr (peray.inria.fr [128.93.8.98]) by discorde.inria.fr (8.13.6/8.13.6) with SMTP id l8HD4lW6007665; Mon, 17 Sep 2007 15:04:48 +0200 Received: by ausone.inria.fr (sSMTP sendmail emulation); Mon, _d Sep 2007 15:04:53 +0200 From: "Nicolas Pouillard" Cc: "O'Caml Mailing List" Subject: Re: [Caml-list] ocamlbuild: change the target name To: Paolo Donadeo References: <4b5157c30709140245ud523bafj14a6aa300290cf3f@mail.gmail.com> In-Reply-To: <4b5157c30709140245ud523bafj14a6aa300290cf3f@mail.gmail.com> Date: Mon, 17 Sep 2007 15:04:53 +0200 Message-Id: <1190033826-sup-9595@ausone.inria.fr> User-Agent: Sup/0.1 Content-Type: text/plain; charset=utf-8 X-j-chkmail-Score: MSGID : 46EE7B6F.000 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 46EE7B6F.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; makefiles:01 bytecode:01 compiler:01 byte:01 byte:01 caml-list:01 binary:02 output:02 native:03 native:03 executable:03 module:03 rename:04 compiled:04 aka:04 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