@echo '/* generated by Makefile */' > libpath.tmp
@echo '#define SCM_PKGDATA_DIR "$(pkgdatadir)"' >> libpath.tmp
@echo '#define SCM_LIBRARY_DIR "$(pkgdatadir)/$(GUILE_EFFECTIVE_VERSION)"'>>libpath.tmp
- @echo '#define SCM_SITE_DIR "$(pkgdatadir)/site"' >> libpath.tmp
+ @echo '#define SCM_SITE_DIR "$(pkgdatadir)/site/$(GUILE_EFFECTIVE_VERSION)"' >> libpath.tmp
+ @echo '#define SCM_GLOBAL_SITE_DIR "$(pkgdatadir)/site"' >> libpath.tmp
@echo '#define SCM_LIB_DIR "$(libdir)"' >> libpath.tmp
@echo '#define SCM_EXTENSIONS_DIR "$(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/extensions"' >> libpath.tmp
@echo '#define SCM_CCACHE_DIR "$(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/ccache"' >> libpath.tmp
#ifdef SCM_SITE_DIR
SCM_DEFINE (scm_sys_site_dir, "%site-dir", 0,0,0,
(),
- "Return the directory where the Guile site files are installed.\n"
- "E.g., may return \"/usr/share/guile/site\".")
+ "Return the directory where users should install Scheme code for use\n"
+ "with this version of Guile.\n\n"
+ "E.g., may return \"/usr/share/guile/site/" SCM_EFFECTIVE_VERSION "\".")
#define FUNC_NAME s_scm_sys_site_dir
{
return scm_from_locale_string (SCM_SITE_DIR);
#undef FUNC_NAME
#endif /* SCM_SITE_DIR */
+#ifdef SCM_GLOBAL_SITE_DIR
+SCM_DEFINE (scm_sys_global_site_dir, "%global-site-dir", 0,0,0,
+ (),
+ "Return the directory where users should install Scheme code for use\n"
+ "with all versions of Guile.\n\n"
+ "E.g., may return \"/usr/share/guile/site\".")
+#define FUNC_NAME s_scm_sys_global_site_dir
+{
+ return scm_from_locale_string (SCM_GLOBAL_SITE_DIR);
+}
+#undef FUNC_NAME
+#endif /* SCM_GLOBAL_SITE_DIR */
\f
else if (env)
path = scm_parse_path (scm_from_locale_string (env), path);
else
- path = scm_list_3 (scm_from_locale_string (SCM_LIBRARY_DIR),
+ path = scm_list_4 (scm_from_locale_string (SCM_LIBRARY_DIR),
scm_from_locale_string (SCM_SITE_DIR),
+ scm_from_locale_string (SCM_GLOBAL_SITE_DIR),
scm_from_locale_string (SCM_PKGDATA_DIR));
env = getenv ("GUILE_SYSTEM_COMPILED_PATH");
#ifndef SCM_LOAD_H
#define SCM_LOAD_H
-/* Copyright (C) 1995,1996,1998,2000,2001, 2006, 2008, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1998,2000,2001, 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
SCM_API SCM scm_sys_package_data_dir (void);
SCM_API SCM scm_sys_library_dir (void);
SCM_API SCM scm_sys_site_dir (void);
+SCM_API SCM scm_sys_global_site_dir (void);
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_primitive_load_path (SCM filename_and_exception_on_not_found);