From: Benedikt Meurer <benedikt.meurer@googlemail.com>
To: Gerd Stolpmann <info@gerd-stolpmann.de>
Cc: caml-list@inria.fr
Subject: [Caml-list] Re: Add support for ocamlmklib subcommand to ocamlfind
Date: Mon, 28 Nov 2011 16:58:19 +0100 [thread overview]
Message-ID: <84C0109F-B82B-482A-AFE9-8A2C733C137F@googlemail.com> (raw)
In-Reply-To: <982F7673-E945-4E19-80B9-A0EB7B054640@googlemail.com>
[-- Attachment #1: Type: text/plain, Size: 596 bytes --]
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 new subcommand "ocamlmklib" to ocamlfind. This (combined with an appropriate fix to OASIS) makes it easier to cross-compile projects using OASIS and C sources. 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.
>
> <0001-Add-support-for-a-new-ocamlmklib-subcommand.patch>
Attached patch adds the necessary configure and extract_args bits.
greets,
Benedikt
[-- Attachment #2: findlib-configure-ocamlmklib.patch --]
[-- Type: application/octet-stream, Size: 1312 bytes --]
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]*[<[]";;
prev parent reply other threads:[~2011-11-28 15:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-28 15:32 [Caml-list] " Benedikt Meurer
2011-11-28 15:58 ` Benedikt Meurer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=84C0109F-B82B-482A-AFE9-8A2C733C137F@googlemail.com \
--to=benedikt.meurer@googlemail.com \
--cc=caml-list@inria.fr \
--cc=info@gerd-stolpmann.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox