mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
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.
This commit is contained in:
parent
beac49b8e1
commit
b05257b923
2 changed files with 18 additions and 1 deletions
|
@ -71,6 +71,9 @@ before any directories in the @env{GUILE_LOAD_PATH} environment
|
||||||
variable. Paths added here are @emph{not} in effect during execution of
|
variable. Paths added here are @emph{not} in effect during execution of
|
||||||
the user's @file{.guile} file.
|
the user's @file{.guile} file.
|
||||||
|
|
||||||
|
@item -C @var{directory}
|
||||||
|
Like @option{-L}, but adjusts the load path for @emph{compiled} files.
|
||||||
|
|
||||||
@item -x @var{extension}
|
@item -x @var{extension}
|
||||||
Add @var{extension} to the front of Guile's load extension list
|
Add @var{extension} to the front of Guile's load extension list
|
||||||
(@pxref{Load Paths, @code{%load-extensions}}). The specified extensions
|
(@pxref{Load Paths, @code{%load-extensions}}). The specified extensions
|
||||||
|
|
|
@ -117,6 +117,7 @@ remaining arguments as the value of (command-line).
|
||||||
If FILE begins with `-' the -s switch is mandatory.
|
If FILE begins with `-' the -s switch is mandatory.
|
||||||
|
|
||||||
-L DIRECTORY add DIRECTORY to the front of the module load path
|
-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
|
-x EXTENSION add EXTENSION to the front of the load extensions
|
||||||
-l FILE load source code from FILE
|
-l FILE load source code from FILE
|
||||||
-e FUNCTION after reading script, apply FUNCTION to
|
-e FUNCTION after reading script, apply FUNCTION to
|
||||||
|
@ -194,6 +195,7 @@ If FILE begins with `-' the -s switch is mandatory.
|
||||||
(script-cell #f)
|
(script-cell #f)
|
||||||
(entry-point #f)
|
(entry-point #f)
|
||||||
(user-load-path '())
|
(user-load-path '())
|
||||||
|
(user-load-compiled-path '())
|
||||||
(user-extensions '())
|
(user-extensions '())
|
||||||
(interactive? #t)
|
(interactive? #t)
|
||||||
(inhibit-user-init? #f)
|
(inhibit-user-init? #f)
|
||||||
|
@ -264,6 +266,14 @@ If FILE begins with `-' the -s switch is mandatory.
|
||||||
(parse (cdr args)
|
(parse (cdr args)
|
||||||
out))
|
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
|
((string=? arg "-x") ; add to %load-extensions
|
||||||
(if (null? args)
|
(if (null? args)
|
||||||
(error "missing argument to `-x' switch"))
|
(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)))
|
`(set! %load-extensions (cons ,ext %load-extensions)))
|
||||||
user-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.
|
;; effect during the loading of the user's customization file.
|
||||||
,@(map (lambda (path)
|
,@(map (lambda (path)
|
||||||
`(set! %load-path (cons ,path %load-path)))
|
`(set! %load-path (cons ,path %load-path)))
|
||||||
user-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.
|
;; Put accumulated actions in their correct order.
|
||||||
,@(reverse! out)
|
,@(reverse! out)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue