OCaml Forge

Detail: [#718] --prefix & --destdir aren't honoured by *all* things that are installed

Bugs: Browse | Download .csv | Monitor

[#718] --prefix & --destdir aren't honoured by *all* things that are installed

Date:
2010-08-21 23:20
Priority:
3
State:
Open
Submitted by:
Magnus Therning (magthe)
Assigned to:
Sylvain Le Gall (gildor-admin)
Product:
None
Due in version:
None
Resolution:
None
Severity:
None
Version:
None
Component:
None
Operating System:
None
 
URL:
Summary:
--prefix & --destdir aren't honoured by *all* things that are installed

Detailed description
During my attempts of packaging OASIS and its dependencies for ArchLinux I basically performed the following steps:

% ocaml ./setup.ml -configure --prefix /usr --destdir pkg_taging_dir
% ocaml ./setup.ml -build
% ocaml ./setup.ml -install

Just to find that the destination dir I passed in at the configuration step wasn't honoured when the package included an ocaml library/module. In that case OASIS attempted to install the files in /usr/lib/ocaml/site-lib/<pkg name>.

The expectation was that *exactly* the steps above would be all that's needed to stage a package using OASIS.

Followup

Message
Date: 2010-08-25 19:58
Sender: Magnus Therning

Sure, it's OK.

I just have to say that it isn't very elegant at all, since it leaks the fact that "ocamlfind" is used underneath. I fully realise that it is the most logical choice, and that this relative ugliness in oasis stems from the fact that "ocamlfind" is an amazingly confused tool that reeks of feature creep and strange design decisions.
Date: 2010-08-24 10:35
Sender: Sylvain Le Gall

--destdir has a special meaning for general configure flag (just as prefix) and it applies to everything that is installed (data/bin) except.

The best option I can provide to you is the following:
- add an ocamlfind_destdir variable default to None
- you can configure it with --ocamlfind-destdir XXX/usr/lib/ocaml
- if you set destdir set ocamlfind_destdir to $(destdir)/$(ocamlfind printconf destdir)
- when invoking ocam setup.ml -install, if the variable ocamlfind_destdir has a value, add --destdir $(ocamlfind_destdir) to the command line, otherwise don't add anything

Is this ok for you ?

Attached Files:

Changes:

Field Old Value Date By
assigned_tonone2010-08-24 10:35gildor-admin