From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 8C8557F71A for ; Sat, 12 Apr 2014 09:44:27 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of adrien@notk.org) identity=pra; client-ip=91.121.71.147; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="adrien@notk.org"; x-sender="adrien@notk.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of adrien@notk.org designates 91.121.71.147 as permitted sender) identity=mailfrom; client-ip=91.121.71.147; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="adrien@notk.org"; x-sender="adrien@notk.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@nautica.notk.org) identity=helo; client-ip=91.121.71.147; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="adrien@notk.org"; x-sender="postmaster@nautica.notk.org"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhQFAIbuSFNbeUeT/2dsb2JhbABZgwaDUFLAGoEYFnSCJQEBAQQjDwFGEAsOCgICBRMOAgIPBRgdAROIE6kOolkXgSmNRQeCbzWBFAEDmGABkkODMzs X-IPAS-Result: AhQFAIbuSFNbeUeT/2dsb2JhbABZgwaDUFLAGoEYFnSCJQEBAQQjDwFGEAsOCgICBRMOAgIPBRgdAROIE6kOolkXgSmNRQeCbzWBFAEDmGABkkODMzs X-IronPort-AV: E=Sophos;i="4.97,847,1389740400"; d="scan'208";a="56776862" Received: from nautica.notk.org ([91.121.71.147]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 12 Apr 2014 09:44:02 +0200 Received: by nautica.notk.org (Postfix, from userid 1003) id 3A2B1C01D; Sat, 12 Apr 2014 09:44:01 +0200 (CEST) Date: Sat, 12 Apr 2014 09:44:01 +0200 From: Adrien Nader To: David Allsopp Cc: "caml-list@inria.fr" Message-ID: <20140412074401.GA803@notk.org> References: <77DB6A35979C449C90DEAC36896DA971@erratique.ch> <53c5ec5fa458ca0ae78f13ff79d9abf5@in.tum.de> <9636C678CAA541CCB505CE8771722A68@erratique.ch> <063FC564F6B44EA5AB1CF1D5589996D0@erratique.ch> <20140412073949.GA31995@notk.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20140412073949.GA31995@notk.org> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [Caml-list] OCaml script on windows (was Re: [ANN] React 1.0.0) On Sat, Apr 12, 2014, Adrien Nader wrote: > On Fri, Apr 11, 2014, David Allsopp wrote: > > Daniel Bünzli wrote: > > > Le vendredi, 11 avril 2014 à 18:32, Daniel Bünzli a écrit : > > > > > > > Ok thanks for the info. Will implement that once I get some free time in > > > my hands. > > > > > > I may also take that as an opportunity to rewrite these *trivial* shell > > > scripts in ocaml for improving windows compatibility. Here are a few > > > questions to the list: > > > > > > 1) What should I use for #!, /usr/bin/env ocaml ? And what will windows > > > do with that ? > > > > Windows can't do anything with that. However, most people compiling OCaml packages on Windows expect to use bash (either from Cygwin or MSYS), where the scripts would run as on Unix. Are you sure that Windows compatibility is already a problem? > > > > > 2) The only OS related things I do is write the .install file and invoke > > > ocamlbuild once with all the targets that need to be build. Is Sys.command > > > enough for that ? and is the invocation syntax identical ? > > > > As long as you don't do anything exotic with command line parameters (quoting can be very weird for the Windows command processor, cmd, which is what Sys.command uses) then yes, Sys.command will be fine, and the same as on Unix. > > > > In passing, it does have to be said that getting Windows support automatically from your build system is something that OASIS does... > > Actually you can do OCaml using the Mingw port while not using Cygwin or > Msys except for an implementation issue in ocaml/ocamlbuild because of > Windows awful "shell" escaping. It is not very difficult to solve (and > ocaml from svn is heading that way). > Sorry, forgot to mention that this included building software through oasis and ocamlbuild. From configure of libraries to build the final executable. And that has been the case for 3 years at least. -- Adrien Nader