guile-user
[Top][All Lists]
Advanced

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

Re: build system for pure Guile library (was Re: Help making a GNU Guix


From: Ricardo Wurmus
Subject: Re: build system for pure Guile library (was Re: Help making a GNU Guix package for pure GNU Guile library)
Date: Thu, 04 Feb 2021 01:09:08 +0100
User-agent: mu4e 1.4.13; emacs 27.1

Zelphir Kaltstahl <zelphirkaltstahl@posteo.de> writes:

> Do you have an example for when one would bake in
> system-specific data-paths?

To satisfy distribution packaging standards your project files may end
up in different directories and cannot assume that the relative relationship
between files remains unchanged.  So if you include images, for example,
and your code loads them then your code cannot assume that they are both
in the same directory.

Your compiled code may end up in a sub-directory of
${prefix}/lib/guile/3.0/site-ccache while your image data might end up
in ${prefix}/share/${application_name}/images.  Or it could be something
completely different.  Conventional “configure” scripts (as generated by
autoconf) give the user the ability to overwrite default locations by
passing “--prefix”, “--localstatedir”, “--libdir”, “--datadir”,
“--datarootdir”, etc.

The fewer assumptions your code makes about locations the happier the
distro packagers will be.  Autoconf and Automake let you record
configured locations by replacing @placeholders@ in template files
ending on “.in”.  Often you’d have a config.scm.in that contains
references to these placeholders and is converted to config.scm during
the run of the “configure” script.

-- 
Ricardo



reply via email to

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