Closed dbuenzli closed 4 years ago
We indeed need to handle multiple libs in the META more gracefully and we should add some checks when generating the META. Seems that ocamlfind
is not happy with sub-packages containing .
for instance: https://github.com/dsheets/webmaster/commit/d3f333e809671669067a8af8323bc2a0a270e454#diff-f2d15237ccdccca502443c61217f46d7R27 generates a buggy META.
I didn't understand the relation between lib
and project
names... seems a bit magical but OK now I know.
Yes, there's currently too much magic, we need to clean that.
The problem is that there is no control at all. Rather than built META
support in that should be an Assemble.ocamlfind_meta
combinator with arguments controlling all that that returns an Other
(soon Base
) component and that you can build through the makefile
.
The .install file and META files should be generated by the makefile and not at setup time. One of the reasons is that their contents depends on the configuration which is not defined at
setup
time. Also it would be nicer not to use the "?" operator in.install
files so that they become real manifests.This should go in pair with the redesign of the
Dir
component. The idea is the following: specify things you'd like to install in aDir
withinstall:true
(in the api remove all the otherinstall
arguments, e.g. inbin
) . Inthe make file the target for theseDir
components have as prerequisite the things they need to install, either we can get the prerequisite path directly in the recipe and generate a .install section directly or we can have each prerequisite target generate a text file after they build their thing and we can cat these files to generate .install section. ThePKG.install
target has the installableDir
components as prerequs andcat
s their generated section to generate thePKG.install
file.Regarding
META
we should derive its contents by looking at the components in alib
installed dir, I guess. But that may not be flexible enough (toploop
cases,backend
trick cases) maybe we should treat it as an `Other component, I think it will be clearer when we get installation right.@samoht does that make sense ?
Related to #81, #84, #66, #37