From: Olaf Hering <olaf@aepfle.de>
To: Christophe Troestler <Christophe.Troestler@umons.ac.be>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] OASIS help: link stublib to system lib and another caml lib
Date: Wed, 1 Jun 2016 18:25:20 +0200 [thread overview]
Message-ID: <20160601162520.GA7712@aepfle.de> (raw)
In-Reply-To: <87h9djf5np.fsf@poincare3.umons.ac.be>
On Sat, May 28, Christophe Troestler wrote:
> You wan only pass static options via _oasis. If you can get the path to
> camlidl — which the camlidl library should provide, try "ocamlfind query
> camlidl" — then you can use the trick below to pass it to ocamlbuild and set
> appropriate flags.
I'm new to all this.
I took the time to create an _oasis file for camlidl in its rpm
specfile, shown below. As you can see the source needs some header file.
But the "runtime" directory is not in the search path, and appearently
there is no generic way to specify the "-I$PWD/runtime". How is this
supposed to be handled?
...
%build
pushd compiler
sed -e 's|%%%%CPP%%%%|cpp|' config.mlp > config.ml
popd
tee _oasis <<_EOF_
OASISFormat: 0.4
Name: camlidl
Version: %{version}
Authors: Xavier Leroy
LicenseFile: LICENSE
License: QPL-1.0 and LGPL-2.0
Synopsis: Stub code generator for OCaml
Plugins: META(`oasis version`)
BuildTools: ocamlbuild
Library com
Path: lib
Install: true
Modules: Com
Library camlidl
Path: runtime
Install: true
Datafiles: camlidlruntime.h (\$standard_library/caml)
CSources: idlalloc.c
CCOpt: -I$PWD/runtime -Wall -O2 -g
Executable camlidl
Install: true
Path: compiler
MainIs: main.ml
CompiledObject: best
_EOF_
oasis setup
ocaml setup.ml -configure \
--destdir %{buildroot} \
--libdir %{_libdir} \
--bindir %{_bindir} \
--prefix %{_prefix}
ocaml setup.ml -build
...
Olaf
prev parent reply other threads:[~2016-06-01 16:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-26 20:11 Olaf Hering
2016-05-26 20:58 ` Christophe Troestler
2016-05-27 8:14 ` Olaf Hering
2016-05-27 23:22 ` Christophe Troestler
2016-06-01 16:25 ` Olaf Hering [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=20160601162520.GA7712@aepfle.de \
--to=olaf@aepfle.de \
--cc=Christophe.Troestler@umons.ac.be \
--cc=caml-list@inria.fr \
/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