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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id B64C67FFE1 for ; Thu, 6 Oct 2016 15:45:55 +0200 (CEST) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=kakadu.hafanana@gmail.com; spf=Pass smtp.mailfrom=kakadu.hafanana@gmail.com; spf=None smtp.helo=postmaster@mail-wm0-f46.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of kakadu.hafanana@gmail.com) identity=pra; client-ip=74.125.82.46; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="kakadu.hafanana@gmail.com"; x-sender="kakadu.hafanana@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of kakadu.hafanana@gmail.com designates 74.125.82.46 as permitted sender) identity=mailfrom; client-ip=74.125.82.46; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="kakadu.hafanana@gmail.com"; x-sender="kakadu.hafanana@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-wm0-f46.google.com) identity=helo; client-ip=74.125.82.46; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="kakadu.hafanana@gmail.com"; x-sender="postmaster@mail-wm0-f46.google.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AHZY9BRGH7hfx+EhoKeQWSp1GYnF86YWxBRYc798d?= =?us-ascii?q?s5kLTJ75pc+wAkXT6L1XgUPTWs2DsrQf2rCQ6PqrBzBIoc7Y9itdINoUD15NoP?= =?us-ascii?q?5VtjJjKfbNMVf8Iv/uYn5yN+V5f3ghwUuGN1NIEt31fVzYry76xzcTHhLiKVg9?= =?us-ascii?q?fbytScb6xv663OGq+pDVfx4AxH/kOeszf12KqlCbjc4bjpd4Lb51gj7IqXtBdu?= =?us-ascii?q?AcjTdtJFmTlhv4oNy38ZF/6SNIk/Mn68NEF679evJrY6ZfCWEFOmM86NCj4RrK?= =?us-ascii?q?TgKD+z0cW2sflBNOCiDK6Rj7WtH6tS6s5bk14zWTIcCjFeN8Yj+l9ao+DUaw0C?= =?us-ascii?q?o=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0AoBgCFVPZXhi5SfUpdHAEBBAEBCgEBF?= =?us-ascii?q?wEBBAEBCgEBgxIBAQEBATw5fAekKYhDi2mCCx6GAgKBegc5EwEBAQEBAQEBAQE?= =?us-ascii?q?BEgEBAQgLCwkZL4IyBAEVAQSCEQEBBBIRHQEIEx0BAwwGBQsNAgImAgIiAREBB?= =?us-ascii?q?QEOAQ0GExQOiBEBAxekI4EyPjKLQoFrgl8Fg28KGScNU4MIAQEBBwEBAQEbAwY?= =?us-ascii?q?Qd4oKhEeDBIJbAQSOOnSKUYIvjUyDOYw7jHeCPRMegREgAoNZIIFhOzSGf4FBA?= =?us-ascii?q?QEB?= X-IPAS-Result: =?us-ascii?q?A0AoBgCFVPZXhi5SfUpdHAEBBAEBCgEBFwEBBAEBCgEBgxI?= =?us-ascii?q?BAQEBATw5fAekKYhDi2mCCx6GAgKBegc5EwEBAQEBAQEBAQEBEgEBAQgLCwkZL?= =?us-ascii?q?4IyBAEVAQSCEQEBBBIRHQEIEx0BAwwGBQsNAgImAgIiAREBBQEOAQ0GExQOiBE?= =?us-ascii?q?BAxekI4EyPjKLQoFrgl8Fg28KGScNU4MIAQEBBwEBAQEbAwYQd4oKhEeDBIJbA?= =?us-ascii?q?QSOOnSKUYIvjUyDOYw7jHeCPRMegREgAoNZIIFhOzSGf4FBAQEB?= X-IronPort-AV: E=Sophos;i="5.31,454,1473112800"; d="scan'208";a="239679765" Received: from mail-wm0-f46.google.com ([74.125.82.46]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 06 Oct 2016 15:45:54 +0200 Received: by mail-wm0-f46.google.com with SMTP id k125so329130860wma.1 for ; Thu, 06 Oct 2016 06:45:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=/mL22wL3AqWd3wlVyFR0bExcpGO3Fn35EiaoGj+5Q+M=; b=uaOUwK/5mKuCURR3R38B2k8S2QQ99fWDYK/26GOHqr+/D9+5QkuDo9ZcxPjqDM3CEI Fkxc3/nNPm/D9LSDSwxHuM3D4tEQ+z9Tev8lmL3yD+jiKt29OYIaqAcU77zwYGxOqFZa wL/ghlNP630Kz4IKKH39jGayz5FBZDTdOExaeIRf8kIH2zY2fXMYZ18RPp9O1I/zSFYd yLJjAnw/JPgSnzxI0ZsTCYFO+Bap/mWBczncAOddLLfvzWoxtb3vgTwDskyssmFjCThx mdv3WuHOEQQI0Cgvizi3771qWvNl2dfVx0xqbXxlDx54m2RZDWTTQNGKC79S1PpHL4dt qZNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=/mL22wL3AqWd3wlVyFR0bExcpGO3Fn35EiaoGj+5Q+M=; b=BF0j0g3gXlsCr0XJ0DHlAYTF3FrGBQ4g76WerPFfrMQ6wLgkwjSVFYiSULK9JQa3G6 0Z7dGZlEUqjrk7csnl+k4mpD0BceB2jTzkF17lWOL3UiJNFoebPikz036yAN9skiRtaZ luG5zk2qtoc5YTh+V934HSLTIjoe2pA9Nka1l8CwpDKPJpWq6BuaeaM0AKSrhnpLU4zi iCSMGvSWg+BLCHe94d1brs+eFMDLLToxqYzIqp74rul2SMfl7OkzkFpVFOzZAJ/hWt9D PB6Dq+f/cbQnoUvHGOhl/X2UjgBnWXNyFD//iJ9NLrsSz1ebVgl4YqCs/lYIRyxdIpDw W64w== X-Gm-Message-State: AA6/9RlRGTsvLluW0D4jCEowYZDxfAohXI3aqbRI7idm1EQaXyUE17VxBxcirBiKUuBotAIdVQxU4OitDIW0QQ== X-Received: by 10.194.178.130 with SMTP id cy2mr12254420wjc.138.1475761554592; Thu, 06 Oct 2016 06:45:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.153.222 with HTTP; Thu, 6 Oct 2016 06:45:34 -0700 (PDT) In-Reply-To: <0F7D3B1B3C4B894D824F5B822E3E5A172CF8E1BA@IRSMSX102.ger.corp.intel.com> References: <0F7D3B1B3C4B894D824F5B822E3E5A172CF8E1BA@IRSMSX102.ger.corp.intel.com> From: Kakadu Date: Thu, 6 Oct 2016 16:45:34 +0300 Message-ID: To: "Soegtrop, Michael" Cc: "caml-list@inria.fr" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] ocamlbuild on Windows and bash vs. cmd Will the powershell be more convenient? Happy hacking, Kakadu On Thu, Oct 6, 2016 at 4:38 PM, Soegtrop, Michael wrote: > Dear OCaml users and developers, > > > > I looked into the fact that ocamlbuild requires bash/cygwin to run. Actua= lly > it does very little use of bash and I think cmd + ln + rm would work quite > well. > > > > From comments in various list I understood that people had issues with > escaping for cmd. I agree that this is a bit nasty, but not rocket science > either. I guess the main issue is that for cmd not only space and tab are > command argument separators, but also equal (=3D), comma (,) and semicolon > (;). So for cmd a=3Db,c;d is the same as a b c d which is the same as a ,= =3D , > b =3D;=3D c=3D=3Dd. Essentially cmd treats unquoted pieces as sed =E2=80= =98s/[\t =3D,;]+/ /g=E2=80=99. > If a name contains any of these characters, one has to quote it for cmd, = but > not for bash. Since =3D and , are not that uncommon in file names, I guess > this resulted in issues. > > > > BUT cmd splits the command line only into command names, complete argument > lists and file names for redirection. That is if you call e.g. ocamlc, cmd > just replaces shell variables and extracts the executable name, but does = not > split up the argument list into individual pieces. bash on Windows does t= his > neither, because (afaik) Windows has at the lowest level no mechanism to > pass individual arguments to an executable. The command gets a string and > splitting this string and even globing is the business of the executable.= So > it is rather odd that this behaves substantially different for bash and f= or > cmd. The only thing which needs to be quoted properly are command names a= nd > file names of redirections. > > > > There might be issue with shell special characters. There are those which > are not allowed in file names =E2=80=9C\/:*?<>| and those allowed in file= names &(). > I guess those not allowed in filenames don=E2=80=99t need any special tre= atment, > since one can=E2=80=99t do that much with them except their special shell= use. The > other 3 one should be escape with ^. There is no way to quote shell speci= al > characters with cmd =E2=80=93 they must be escaped with ^. > > > > The only real issue is that some people seem to use build rules with =E2= =80=9Creal=E2=80=9D > bash stuff in it =E2=80=93 well if you do this I guess you anyway have a = cygwin > around. > > > > So I wonder if it would be appreciated by the community to have an > ocamlbuild (e.g. as a configure option) which uses cmd instead of bash. I > think if one does the escaping properly, this should be good for the large > majority of projects out there. > > > > Ocamlc seems to run fine without cygwin, but I didn=E2=80=99t test other = tools like > ocamllex or menhir as yet. Are there known issues? > > > > Best regards, > > > > Michael > > > > > > Intel Deutschland GmbH > Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany > Tel: +49 89 99 8853-0, www.intel.de > Managing Directors: Christin Eisenschmid, Christian Lamprechter > Chairperson of the Supervisory Board: Nicole Lau > Registered Office: Munich > Commercial Register: Amtsgericht Muenchen HRB 186928