samoht / assemblage

A collection of tools to manage the configuration of OCaml projects
54 stars 4 forks source link

Installation and PGK.install and META file. #86

Closed dbuenzli closed 4 years ago

dbuenzli commented 10 years ago

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 a Dir with install:true (in the api remove all the other install arguments, e.g. in bin) . Inthe make file the target for these Dir 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. The PKG.install target has the installable Dir components as prerequs and cats their generated section to generate the PKG.install file.

Regarding META we should derive its contents by looking at the components in a lib 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

samoht commented 10 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.

dsheets commented 10 years ago

I didn't understand the relation between lib and project names... seems a bit magical but OK now I know.

samoht commented 10 years ago

Yes, there's currently too much magic, we need to clean that.

dbuenzli commented 10 years ago

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.