From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id pASFwTAT001130 for ; Mon, 28 Nov 2011 16:58:29 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjEBAASv007RVaE2kGdsb2JhbABDqnYIIgEBAQEJCQ0HFAQhgXIBAQEDARICLAEBNwEECwsOJhI0AQUBHAY1h2MCmgYKijOEFgGOKweJf2OOBZQhPYN3 X-IronPort-AV: E=Sophos;i="4.69,584,1315173600"; d="scan'208";a="132997818" Received: from mail-fx0-f54.google.com ([209.85.161.54]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 28 Nov 2011 16:58:23 +0100 Received: by faak28 with SMTP id k28so410299faa.27 for ; Mon, 28 Nov 2011 07:58:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to:x-mailer; bh=Hk/towFfT+bCPdr7WLlYJIOhrHZdrEGWaKc1J1OuhYU=; b=JN7XwmO+Tw5FZyikLY3vwMUIhpzvT3mK10lNhvHQ+8+UkhMm/lW6DDm7fZERwHmHb1 xuwbfwCWA5nXCl3uBUY5EuMTJgKAmp6UWa8TNNn8zMIww9Pc24oQaIGxYXBRL1KOq/TO pnItKPBmuyALD+Iw5cpMUyBTt/2QfeAI+x+FY= Received: by 10.205.127.139 with SMTP id ha11mr46911145bkc.111.1322495903233; Mon, 28 Nov 2011 07:58:23 -0800 (PST) Received: from coruscant.kosmos.all (ip-95-223-170-32.unitymediagroup.de. [95.223.170.32]) by mx.google.com with ESMTPS id hw14sm17513876bkc.16.2011.11.28.07.58.20 (version=SSLv3 cipher=OTHER); Mon, 28 Nov 2011 07:58:21 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: multipart/mixed; boundary="Apple-Mail=_34D122C7-29D1-473B-8D33-ED7C1C48315E" From: Benedikt Meurer In-Reply-To: <982F7673-E945-4E19-80B9-A0EB7B054640@googlemail.com> Date: Mon, 28 Nov 2011 16:58:19 +0100 Cc: caml-list@inria.fr Message-Id: <84C0109F-B82B-482A-AFE9-8A2C733C137F@googlemail.com> References: <982F7673-E945-4E19-80B9-A0EB7B054640@googlemail.com> To: Gerd Stolpmann X-Mailer: Apple Mail (2.1251.1) Subject: [Caml-list] Re: Add support for ocamlmklib subcommand to ocamlfind --Apple-Mail=_34D122C7-29D1-473B-8D33-ED7C1C48315E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Nov 28, 2011, at 16:32 , Benedikt Meurer wrote: > Attached is a simple patch for findlib 1.2.7, which adds support for a ne= w subcommand "ocamlmklib" to ocamlfind. This (combined with an appropriate = fix to OASIS) makes it easier to cross-compile projects using OASIS and C s= ources. I'm not sure about the predicates to use for ocamlmklib, it's "byte= " and "native" in the patch, but it may be safer to specify no defaults at = all. >=20 > <0001-Add-support-for-a-new-ocamlmklib-subcommand.patch> Attached patch adds the necessary configure and extract_args bits. greets, Benedikt --Apple-Mail=_34D122C7-29D1-473B-8D33-ED7C1C48315E Content-Disposition: attachment; filename=findlib-configure-ocamlmklib.patch Content-Type: application/octet-stream; name="findlib-configure-ocamlmklib.patch" Content-Transfer-Encoding: 7bit diff --git a/configure b/configure index 73c0caa..191e167 100755 --- a/configure +++ b/configure @@ -486,7 +486,7 @@ printf "Detecting compiler arguments: " ( cd tools/extract_args && make ) >ocargs.log 2>&1 if [ "$?" -eq 0 ]; then printf "(extractor built) " - tools/extract_args/extract_args -o src/findlib/ocaml_args.ml ocamlc ocamlcp ocamlmktop ocamlopt ocamldep ocamldoc >>ocargs.log 2>&1 + tools/extract_args/extract_args -o src/findlib/ocaml_args.ml ocamlc ocamlcp ocamlmklib ocamlmktop ocamlopt ocamldep ocamldoc >>ocargs.log 2>&1 # ocamlbrowser does not work! if [ $? -eq 0 ]; then echo "ok" diff --git a/tools/extract_args/extract_args.ml b/tools/extract_args/extract_args.ml index 9f28e52..7fefdaa 100644 --- a/tools/extract_args/extract_args.ml +++ b/tools/extract_args/extract_args.ml @@ -29,7 +29,7 @@ let get_help cmd = let help_out = try let code = - Sys.command (sprintf "%s -help >%s" + Sys.command (sprintf "%s -help >%s 2>&1" cmd (Filename.quote temp_file)) in if code <> 0 then @@ -43,7 +43,7 @@ let get_help cmd = ;; -let switch_re = Str.regexp "[ \t]*\\(-[-a-zA-Z0-9_]*\\)[ \t]\\(.*\\)$";; +let switch_re = Str.regexp "[ \t]*\\(-[-a-zA-Z0-9_,]*\\)[ \t]?\\(.*\\)$";; let argument_re = Str.regexp "[ \t]*[<[]";; --Apple-Mail=_34D122C7-29D1-473B-8D33-ED7C1C48315E--