This is the mail archive of the
cgen@sourceware.org
mailing list for the CGEN project.
[RFA] Add "." to %load-path for guile 1.8.
- From: Doug Evans <dje at sebabeach dot org>
- To: cgen at sourceware dot org
- Date: Fri, 5 Jun 2009 05:01:42 -0700
- Subject: [RFA] Add "." to %load-path for guile 1.8.
Hi.
Guile 1.8 removed "." from %load-path so "guile -s ../relative/path/foo.scm"
no longer works, and this breaks cgen.
Tested with guile 1.4.1 and 1.8.5 on m32r binutils.
If someone has a strong opinion on solving this differently,
please speak up.
[For completeness' sake,
While I myself trip over the "info" command's distinction between
"info -f foo" and "info -f ./foo" from time to time, I wonder if
Guile shouldn't treat relative paths separately as well. But we still
have to cope with 1.8.x of course.]
2009-06-05 Doug Evans <dje@sebabeach.org>
* guile.scm: Add "." to %load-path if >= guile version 1.8.
Index: guile.scm
===================================================================
RCS file: /cvs/src/src/cgen/guile.scm,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 guile.scm
--- guile.scm 15 Feb 2005 09:03:59 -0000 1.3
+++ guile.scm 7 Jun 2009 22:25:35 -0000
@@ -64,6 +64,13 @@
objs)
(newline (current-error-port)))
+;; Guile 1.8 no longer has "." in %load-path so relative path loads
+;; no longer work.
+
+(if (or (> *guile-major-version* 1)
+ (>= *guile-minor-version* 8))
+ (set! %load-path (append %load-path (list ".")))
+)
;;; Enabling and disabling debugging features of the host Scheme.