guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Make a library installable?


From: HiPhish
Subject: Make a library installable?
Date: Sun, 12 May 2019 16:50:28 +0200

Hello Schemers,

A while ago I presented my MessagePack implementation for Guile[1] here and I 
want to make it available to users. Guile has no dedicated package manager, so 
it's either manual or Guix, and I would like to support both. What it the best 
way of doing it?

So far I have a repository that can be used right away with Guile by adding 
its path to the load path. This is handy for testing and working where I just 
just invoke Guile as `guile -L .`. For more permanent installation I have a 
makefile, it "builds" everything into `./build` (i.e. inside the repo) and from 
there the user could copy-paste the files into the desired directory.

I was thinking of adding an "install" target to the makefile which would copy 
the directory structure of `./build` to the directory given by `$PREFIX`. The 
user could then type

    make lib doc && make PREFIX=/usr/local install

to get everything installed globally. A package manager like Guix could  just 
specify a different `PREFIX`.

Is this reasonable? And where exactly should the Guile code be placed? I have 

        $(PREFIX)/share/guile/site/$(guile_ver)/msgpack

as the directory for now. The value of `$guile_ver` is determined 
automatically at build time:

        guile_ver = $(shell $(GUILE) -c '(display (effective-version))')

This would only make the module available for Guile 2.2, no other version. Is 
there a better directory?

I guess I could use GNU Autotools instead of a manually written makefile, but I 
would rather stick to what I know and is simple for such a simple project.

[1] https://gitlab.com/HiPhish/guile-msgpack





reply via email to

[Prev in Thread] Current Thread [Next in Thread]