summaryrefslogtreecommitdiff
path: root/libguile/load.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@red-bean.com>1997-06-23 23:48:39 +0000
committerJim Blandy <jimb@red-bean.com>1997-06-23 23:48:39 +0000
commite151bee62a85946ecdfd00de166647747db0191c (patch)
treec07c3930cb0b737a17eb58b58b4d778e1ce0fe48 /libguile/load.c
parent9b345f6c21e81a56ef53298736220813c6fe16f3 (diff)
downloadguile-e151bee62a85946ecdfd00de166647747db0191c.tar.gz
* Makefile.am (libpath.h): Include the values of all the standard
Makefile directory variables. Print a message, but don't print all the commands. (versiondat.h): Print a message, but don't print all the commands. * load.c: #include "alist.h". (init_build_info): New function. (scm_init_load): Call it. * Makefile.in: Regenerated.
Diffstat (limited to 'libguile/load.c')
-rw-r--r--libguile/load.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/libguile/load.c b/libguile/load.c
index 90a4488e0..379107151 100644
--- a/libguile/load.c
+++ b/libguile/load.c
@@ -47,6 +47,7 @@
#include "read.h"
#include "eval.h"
#include "throw.h"
+#include "alist.h"
#include "load.h"
@@ -322,7 +323,25 @@ scm_read_and_eval_x (port)
}
+/* Information about the build environment. */
+/* Initialize the scheme variable %guile-build-info, based on data
+ provided by the Makefile, via libpath.h. */
+static void
+init_build_info ()
+{
+ static struct { char *name; char *value; } info[] = SCM_BUILD_INFO;
+ SCM *loc = SCM_CDRLOC (scm_sysintern ("%guile-build-info", SCM_EOL));
+ int i;
+
+ for (i = 0; i < (sizeof (info) / sizeof (info[0])); i++)
+ *loc = scm_acons (SCM_CAR (scm_intern0 (info[i].name)),
+ scm_makfrom0str (info[i].value),
+ *loc);
+}
+
+
+
void
scm_init_load ()
{
@@ -334,5 +353,7 @@ scm_init_load ()
SCM_UNDEFINED)));
scm_loc_load_hook = SCM_CDRLOC(scm_sysintern("%load-hook", SCM_BOOL_F));
+ init_build_info ();
+
#include "load.x"
}