Re: Configuring multiple libccdirs

Bernd Paysan <[email protected]>
Newsgroups gmane.comp.lang.forth.gforth
Message-ID <2694592.fuX482F6kS@daiyu>
Am Dienstag, 3. Juli 2018, 12:03:57 CEST schrieb Reepca Russelstein:
> Currently there are two places gforth will check for already-existing
> compiled wrapper code:
> 
> 1. ~/.gforth/<machine-type>/libcc-named
> 2. $libccdir or, if that isn't set, the value of $libccdir at the time
> gforth was compiled.
> 
> This presents an issue if we have wrapper code we want to go somewhere
> else and want gforth to still be able to find its own wrapper code -
> we can't set libccdir for this purpose. For example, if I want to
> install a separate package that provides wrapper code - maybe I'll
> call it gforth-glfw - I'd want to put it in
> PREFIX/lib/gforth/site-forth/libcc-named.
> 
> Could we change libccdir to specify a search path instead of a single
> directory, with build-time $libccdir implicitly prepended to that
> path?

Yes, that's easy to do.  I would suggest however to keep libccdir as is, and 
add a GFORTHCCPATH the way you want to.  Public visible environment variables 
controlling Gforth should be in uppercase and have a GFORTH in their name.

> I see that libcc.fs already uses a search path internally for
> it. The only complication I could foresee is saving the build-time
> path as opposed to a single string.

No complication.  A path is also just a string (with '\0' as separating 
character).

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
net2o id: kQusJzA;7*?t=uy@X}1GWr!+0qqp_Cn176t4(dQ*
https://net2o.de/
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEERJ1NDqPQRwYnwBjr9y2Uk5MtoGcFAls7iXoACgkQ9y2Uk5Mt
oGfDBQ//QNfby20l19YPR3zVvaJUIoiKu3F7F7Zjpo0aCWm4MeWJPcau/8yqgA2j
2A8Yl2QmH/VojJ+nqUvakNWpZTbCRVcAv/lQ6/ZdZGiZktc5f9//eo9EDsDz9IEr
TS+5hNl0tXR4v5SFtl7wqCgXHMBsGHZdvq/g7PVieTRGvtHXGeKI9gjY7ZvZkMqM
jn4G0muCUhfeM+Sr32S0jonTYDd5E3p/7ZvQbgAwxoT2kh3x3miS1PPg1Hppn/Bg
yoAdxg45YSVS3vYiG21tjGvYGIx3m4PP7r+G+u2ryvUeyQGsEeKvFJZN0UdS2F1h
4yHSsU5ZyAEOLGvb6xE7aFtkzwScjUVjHwc4Baw3OeH9yv5mSJ/RSywGfj/FbZ7m
C+QkaQnI/k1NnoQwK8rHallAF0sSjy/bEPTSJ6ZWAGwvRHDyr8eWoHZXlFsFkrXL
XaNxuvBiyE0YTR3YpBm84Mq2dbJzyce4FMdPBHXQcjeknx0kX7PPz1AMRmKcC1oV
bHmBXQdaz0G0rLMeiLuY60ZNjMza17kJMmOEQKQ6cSTQDcyhbSTd6XxREbIU95Y7
Z2yjm6lnDJgrEEZpZB7xZ48cXUgWjIPgbyO8BAhqRpDYH2g4OhrjGkgrrxbnDTgV
RPqVIqF5Vil3jWl3M+oWnOXoq6SaeMcbcN/rbLjmwCLdIHQWs2I=
=unWo
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.