mes: Support -C and -L for Guile compatibility.
* module/mes/boot-0.scm): Support -C and -L for Guile compatibility. Signed-off-by: Jan Nieuwenhuizen <janneke@gnu.org>
This commit is contained in:
parent
4ca4e9a6ff
commit
1b0089111f
|
@ -238,9 +238,11 @@
|
||||||
(let ((tty? (isatty? 0)))
|
(let ((tty? (isatty? 0)))
|
||||||
(define (parse-opts args)
|
(define (parse-opts args)
|
||||||
(let* ((option-spec
|
(let* ((option-spec
|
||||||
'((dump)
|
'((compiled-path (single-char #\C) (value #t))
|
||||||
|
(dump)
|
||||||
(help (single-char #\h))
|
(help (single-char #\h))
|
||||||
(load)
|
(load)
|
||||||
|
(load-path (single-char #\L) (value #t))
|
||||||
(main (single-char #\e) (value #t))
|
(main (single-char #\e) (value #t))
|
||||||
(source (single-char #\s) (value #t))
|
(source (single-char #\s) (value #t))
|
||||||
(version (single-char #\V)))))
|
(version (single-char #\V)))))
|
||||||
|
@ -271,15 +273,21 @@ Evaluate code with Mes, interactively or from a script.
|
||||||
The above switches stop argument processing, and pass all
|
The above switches stop argument processing, and pass all
|
||||||
remaining arguments as the value of (command-line).
|
remaining arguments as the value of (command-line).
|
||||||
|
|
||||||
|
-C,--compiled-path=DIR
|
||||||
|
ignored for Guile compatibility
|
||||||
--dump dump binary program to stdout
|
--dump dump binary program to stdout
|
||||||
-e,--main=MAIN after reading script, apply MAIN to command-line arguments
|
-e,--main=MAIN after reading script, apply MAIN to command-line arguments
|
||||||
-h, --help display this help and exit
|
-h, --help display this help and exit
|
||||||
--load load binary program [module/mes/boot-0.32-mo]
|
--load load binary program [module/mes/boot-0.32-mo]
|
||||||
|
-L,--load-path=DIR add DIR to the front of the module load path
|
||||||
-v, --version display version information and exit
|
-v, --version display version information and exit
|
||||||
" (or (and usage? (current-error-port)) (current-output-port)))
|
" (or (and usage? (current-error-port)) (current-output-port)))
|
||||||
(exit (or (and usage? 2) 0)))
|
(exit (or (and usage? 2) 0)))
|
||||||
options)
|
options)
|
||||||
(if main (set! %main main))
|
(if main (set! %main main))
|
||||||
|
(and=> (option-ref options 'load-path #f)
|
||||||
|
(lambda (dir)
|
||||||
|
(setenv "GUILE_LOAD_PATH" (string-append dir ":" (getenv "GUILE_LOAD_PATH")))))
|
||||||
(cond ((pair? files)
|
(cond ((pair? files)
|
||||||
(let* ((file (car files))
|
(let* ((file (car files))
|
||||||
(port (if (equal? file "-") 0
|
(port (if (equal? file "-") 0
|
||||||
|
|
Loading…
Reference in a new issue