[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-260-gb0525

From: Mark H Weaver
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-260-gb05257b
Date: Sun, 31 Mar 2013 02:56:13 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

The branch, stable-2.0 has been updated
       via  b05257b9232e2ee631c28b15cace5981c4927446 (commit)
      from  beac49b8e129b28902f4b600e15aa3b92c9ce7fd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b05257b9232e2ee631c28b15cace5981c4927446
Author: Mark H Weaver <address@hidden>
Date:   Fri Mar 29 12:28:49 2013 -0400

    Add -C command-line option to adjust %load-compiled-path.
    * module/ice-9/command-line.scm (compile-shell-switches):
      Implement -C option.
      (*usage*): Add -C option.
    * doc/ref/guile-invoke.texi (Command-line Options): Add docs.


Summary of changes:
 doc/ref/guile-invoke.texi     |    3 +++
 module/ice-9/command-line.scm |   16 +++++++++++++++-
 2 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/doc/ref/guile-invoke.texi b/doc/ref/guile-invoke.texi
index 397bc47..866bf1d 100644
--- a/doc/ref/guile-invoke.texi
+++ b/doc/ref/guile-invoke.texi
@@ -71,6 +71,9 @@ before any directories in the @env{GUILE_LOAD_PATH} 
 variable.  Paths added here are @emph{not} in effect during execution of
 the user's @file{.guile} file.
address@hidden -C @var{directory}
+Like @option{-L}, but adjusts the load path for @emph{compiled} files.
 @item -x @var{extension}
 Add @var{extension} to the front of Guile's load extension list
 (@pxref{Load Paths, @code{%load-extensions}}).  The specified extensions
diff --git a/module/ice-9/command-line.scm b/module/ice-9/command-line.scm
index 2aa50ec..0211b85 100644
--- a/module/ice-9/command-line.scm
+++ b/module/ice-9/command-line.scm
@@ -117,6 +117,7 @@ remaining arguments as the value of (command-line).
 If FILE begins with `-' the -s switch is mandatory.
   -L DIRECTORY   add DIRECTORY to the front of the module load path
+  -C DIRECTORY   like -L, but for compiled files
   -x EXTENSION   add EXTENSION to the front of the load extensions
   -l FILE        load source code from FILE
   -e FUNCTION    after reading script, apply FUNCTION to
@@ -194,6 +195,7 @@ If FILE begins with `-' the -s switch is mandatory.
         (script-cell #f)
         (entry-point #f)
         (user-load-path '())
+        (user-load-compiled-path '())
         (user-extensions '())
         (interactive? #t)
         (inhibit-user-init? #f)
@@ -264,6 +266,14 @@ If FILE begins with `-' the -s switch is mandatory.
             (parse (cdr args)
+           ((string=? arg "-C")         ; add to %load-compiled-path
+            (if (null? args)
+                (error "missing argument to `-C' switch"))
+            (set! user-load-compiled-path
+                  (cons (car args) user-load-compiled-path))
+            (parse (cdr args)
+                   out))
            ((string=? arg "-x")         ; add to %load-extensions
             (if (null? args)
                 (error "missing argument to `-x' switch"))
@@ -430,11 +440,15 @@ If FILE begins with `-' the -s switch is mandatory.
                    `(set! %load-extensions (cons ,ext %load-extensions)))
-          ;; Add the user-specified load path here, so it won't be in
+          ;; Add the user-specified load paths here, so they won't be in
           ;; effect during the loading of the user's customization file.
           ,@(map (lambda (path)
                    `(set! %load-path (cons ,path %load-path)))
+          ,@(map (lambda (path)
+                   `(set! %load-compiled-path
+                          (cons ,path %load-compiled-path)))
+                 user-load-compiled-path)
           ;; Put accumulated actions in their correct order.
           ,@(reverse! out)

GNU Guile

reply via email to

[Prev in Thread] Current Thread [Next in Thread]