guile-user
[Top][All Lists]
Advanced

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

Re: install directories


From: Marius Vollmer
Subject: Re: install directories
Date: 19 Feb 2001 17:25:46 +0100
User-agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7

thi <address@hidden> writes:

> i'd like to start discussion on installation directories in order to try
> to get a "recommended layout" into some guile documentation.

Yes, we need to clean up the current mess.

What I would specify right now is this:

 - Modules consisting of compiled code are treated as (Unix) shared
   libraries in every respect.  They get installed where all the
   shared libraries get installed, in EXEC-PREFIX/lib.  They are all
   in one directory, and have names like

     libguile-MOD-MOD.so

   for a library that helps to implement (mod mod).  The names are not
   significant, this rule is only to avoid name clashes.  If the user
   wants to use a different naming scheme, that is no problem.

 - The shared library contains an initialization function of an
   unspecified name.  This function does not perform any explicit
   module system operations.  It just defines its new bindings in what
   happens to be the current module.

 - Guile does not attempt to find and link the shared library
   automatically.  For this to happen, the user is supposed to write a
   small Scheme file with a contents like

     (define-module (mod mod))
     
     (dynamic-call "mod_mod_init" (dynamic-link "libguile-mod-mod"))

     (export-all)

   That is, loading of shared libraries is made explicit.  We can
   provide a more convenient way to specify the usual case, like

     (define-module (mod mod)
       :dynamic-link (libguile-mod-mod mod_mod_init)
       :export-all)

   but the user should know that this is only a shortcut with no added
   magic.

   The (export-all) declaration modifies the current module so that
   every new and existing binding is exported.

 - The Scheme file above is of course installed somewhere on the
   load-path of Guile.

I don't think it is useful to treat compiled modules differently from
other shared libraries.  You will want to use them as shared libraries
eventually, when you want to use one compiled module from another, for
example.

The mechanism above is not too difficult to understand, in any case
not more difficult than to understand what is Guile is trying to do
right now.

> has this been discussed previously?

I think so, but not in a very focused way.



reply via email to

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