Commit 777373c3 authored by Erick Gallesio's avatar Erick Gallesio

Added --prepend-load-path and --append-load-path options to the compiler

parent 92e09863
......@@ -35,6 +35,7 @@ Output the compiled code in the given file instead of
.I a.out.
.IP "--C-code, -C"
Produce the byte-code in a C file instead of a ".ostk" file.
.IP "--evalute=<expr>, e <expr>"
Evaluate the Sexpr <expr> before starting compilation. This is useful,
for loading files which are needed for the compilation (e.g. files
......@@ -42,6 +43,12 @@ defining new syntaxes).
.IP "--line-info, -l"
Generate line informations to ease debugging (incurs a small
performance penalty).
.IP "--prepend-load-path=<dir>, -L <dir>"
Prepend the directory <dir> to the compiler loading path.
.IP "--append-load-path=<dir>"
Append the directory <dir> to the compiler loading path.
.IP "--no-time"
Do not display the compilation time
.IP "--help | -h | -?"
......@@ -21,7 +21,7 @@
;;;; Author: Erick Gallesio []
;;;; Creation date: 4-Dec-2001 18:12 (eg)
;;;; Last file update: 30-Jan-2007 18:39 (eg)
;;;; Last file update: 1-Feb-2007 13:34 (eg)
(define *output* "a.out")
......@@ -117,22 +117,35 @@
"Input options"
(("case-sensitive" :alternate "c" :help "Be case sensitive on symbols")
(read-case-sensitive #t))
"Output options"
(("output" :alternate "o" :arg file :help "Output compiled code in <file>")
(set! *output* file))
(("C-code" :alternate "C" :help "Produce C code")
(set! *c-code* #t))
"Compiling options"
(("evaluate" :alternate "e" :arg expr
:help "evaluate <expr> before compiling file")
(set! *expr* expr))
(("line-info" :alternate "l" :help "Insert line numbers in generated file")
(compiler:gen-line-number #t))
"Path options"
(("prepend-load-path" :alternate "L" :arg dir
:help "Prepend <dir> to the loading path")
(set! (load-path) (cons dir (load-path))))
(("append-load-path" :arg dir
:help "Append <dir> to the loading path")
(set! (load-path) (cons (load-path) (list dir))))
"Misc. options"
(("no-time" :help "Don't display compilation time")
(compiler:time-display #f))
(("help" :alternate "h" :help "This help")
(arg-usage (current-error-port))
(exit 1))
((= (length other-arguments) 1)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment