mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-02 13:00:26 +02:00
add %site-ccache-dir
* libguile/load.h: * libguile/load.c (scm_sys_site_ccache_dir): New procedure. * doc/ref/scheme-using.texi (Installing Site Packages): * doc/ref/api-options.texi (Build Config): Add docs. Fixes bug 10326.
This commit is contained in:
parent
a4b4fbbdaa
commit
988ca6b212
4 changed files with 28 additions and 6 deletions
|
@ -96,6 +96,13 @@ your site should be installed. On Unix-like systems, this is usually
|
||||||
@file{/usr/local/share/guile/site} or @file{/usr/share/guile/site}.
|
@file{/usr/local/share/guile/site} or @file{/usr/share/guile/site}.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
@deffn {Scheme Procedure} %site-ccache-dir
|
||||||
|
@deffnx {C Function} scm_sys_site_ccache_dir ()
|
||||||
|
Return the directory where users should install compiled @code{.go}
|
||||||
|
files for use with this version of Guile. Might look something like
|
||||||
|
@file{/usr/lib/guile/@value{EFFECTIVE-VERSION}/site-ccache}.
|
||||||
|
@end deffn
|
||||||
|
|
||||||
@defvar %guile-build-info
|
@defvar %guile-build-info
|
||||||
Alist of information collected during the building of a particular
|
Alist of information collected during the building of a particular
|
||||||
Guile. Entries can be grouped into one of several categories:
|
Guile. Entries can be grouped into one of several categories:
|
||||||
|
|
|
@ -752,6 +752,7 @@ list}, or simply @code{guild}.
|
||||||
@cindex site path
|
@cindex site path
|
||||||
@cindex load path
|
@cindex load path
|
||||||
@findex %site-dir
|
@findex %site-dir
|
||||||
|
@findex %site-ccache-dir
|
||||||
|
|
||||||
At some point, you will probably want to share your code with other
|
At some point, you will probably want to share your code with other
|
||||||
people. To do so effectively, it is important to follow a set of common
|
people. To do so effectively, it is important to follow a set of common
|
||||||
|
@ -783,11 +784,11 @@ find them.
|
||||||
As with Scheme files, Guile searches a path to find compiled @code{.go}
|
As with Scheme files, Guile searches a path to find compiled @code{.go}
|
||||||
files, the @code{%load-compiled-path}. By default, this path has two
|
files, the @code{%load-compiled-path}. By default, this path has two
|
||||||
entries: a path for Guile's files, and a path for site packages. You
|
entries: a path for Guile's files, and a path for site packages. You
|
||||||
should install your @code{.go} files into the latter. Currently there
|
should install your @code{.go} files into the latter directory, whose
|
||||||
is no procedure to get at this path, which is probably a bug. As in the
|
value is returned by invoking the @code{%site-ccache-dir} procedure. As
|
||||||
previous example, if Guile @value{EFFECTIVE-VERSION} is installed on
|
in the previous example, if Guile @value{EFFECTIVE-VERSION} is installed
|
||||||
your system in @code{/usr/}, then the place to put compiled files for
|
on your system in @code{/usr/}, then @code{(%site-ccache-dir)} site
|
||||||
site packages will be
|
packages will be
|
||||||
@code{/usr/lib/guile/@value{EFFECTIVE-VERSION}/site-ccache}.
|
@code{/usr/lib/guile/@value{EFFECTIVE-VERSION}/site-ccache}.
|
||||||
|
|
||||||
Note that a @code{.go} file will only be loaded in preference to a
|
Note that a @code{.go} file will only be loaded in preference to a
|
||||||
|
|
|
@ -198,6 +198,19 @@ SCM_DEFINE (scm_sys_global_site_dir, "%global-site-dir", 0,0,0,
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
#endif /* SCM_GLOBAL_SITE_DIR */
|
#endif /* SCM_GLOBAL_SITE_DIR */
|
||||||
|
|
||||||
|
#ifdef SCM_SITE_CCACHE_DIR
|
||||||
|
SCM_DEFINE (scm_sys_site_ccache_dir, "%site-ccache-dir", 0,0,0,
|
||||||
|
(),
|
||||||
|
"Return the directory where users should install compiled\n"
|
||||||
|
"@code{.go} files for use with this version of Guile.\n\n"
|
||||||
|
"E.g., may return \"/usr/lib/guile/" SCM_EFFECTIVE_VERSION "/site-ccache\".")
|
||||||
|
#define FUNC_NAME s_scm_sys_site_ccache_dir
|
||||||
|
{
|
||||||
|
return scm_from_locale_string (SCM_SITE_CCACHE_DIR);
|
||||||
|
}
|
||||||
|
#undef FUNC_NAME
|
||||||
|
#endif /* SCM_SITE_CCACHE_DIR */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Initializing the load path, and searching it. */
|
/* Initializing the load path, and searching it. */
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#ifndef SCM_LOAD_H
|
#ifndef SCM_LOAD_H
|
||||||
#define SCM_LOAD_H
|
#define SCM_LOAD_H
|
||||||
|
|
||||||
/* Copyright (C) 1995,1996,1998,2000,2001, 2006, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
|
/* Copyright (C) 1995,1996,1998,2000,2001, 2006, 2008, 2009, 2010, 2011, 2013 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public License
|
* modify it under the terms of the GNU Lesser General Public License
|
||||||
|
@ -34,6 +34,7 @@ SCM_API SCM scm_sys_package_data_dir (void);
|
||||||
SCM_API SCM scm_sys_library_dir (void);
|
SCM_API SCM scm_sys_library_dir (void);
|
||||||
SCM_API SCM scm_sys_site_dir (void);
|
SCM_API SCM scm_sys_site_dir (void);
|
||||||
SCM_API SCM scm_sys_global_site_dir (void);
|
SCM_API SCM scm_sys_global_site_dir (void);
|
||||||
|
SCM_API SCM scm_sys_site_ccache_dir (void);
|
||||||
SCM_API SCM scm_search_path (SCM path, SCM filename, SCM rest);
|
SCM_API SCM scm_search_path (SCM path, SCM filename, SCM rest);
|
||||||
SCM_API SCM scm_sys_search_load_path (SCM filename);
|
SCM_API SCM scm_sys_search_load_path (SCM filename);
|
||||||
SCM_API SCM scm_primitive_load_path (SCM filename_and_exception_on_not_found);
|
SCM_API SCM scm_primitive_load_path (SCM filename_and_exception_on_not_found);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue