diff options
author | Mark H Weaver <mhw@netris.org> | 2013-03-30 22:56:27 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2013-03-30 22:56:27 -0400 |
commit | 86cf4773ff94a128247d484e6d69786869f41ebc (patch) | |
tree | a44cc484c7e1a9d55d957dc54cc8260b496f544d /module/ice-9/command-line.scm | |
parent | c33ecf96a41979be0af1d56a7e12ad7c1196f12b (diff) | |
parent | b05257b9232e2ee631c28b15cace5981c4927446 (diff) | |
download | guile-86cf4773ff94a128247d484e6d69786869f41ebc.tar.gz |
Merge remote-tracking branch 'origin/stable-2.0'
Diffstat (limited to 'module/ice-9/command-line.scm')
-rw-r--r-- | module/ice-9/command-line.scm | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/module/ice-9/command-line.scm b/module/ice-9/command-line.scm index 2aa50ec80..0211b851c 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) out)) + ((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))) user-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))) user-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) |