diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-07-19 17:54:30 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2018-08-07 12:34:11 +0200 |
commit | 44cdabd9e3b8bc7baca4e6b7506b950dd7cbadd4 (patch) | |
tree | 743499455ad3a036fe4d739f583fcd195420c061 /module/scripts/compile.scm | |
parent | 0075b7f4dc2aaad157e866ec7be91ac9f6362b93 (diff) | |
download | guile-44cdabd9e3b8bc7baca4e6b7506b950dd7cbadd4.tar.gz |
compile: Add '-x' flag.
* module/scripts/compile.scm (%options, compile): Add '-x'.
* doc/ref/api-evaluation.texi (Compilation): Document it.
Diffstat (limited to 'module/scripts/compile.scm')
-rw-r--r-- | module/scripts/compile.scm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/module/scripts/compile.scm b/module/scripts/compile.scm index 5aa58d3e9..924456ed2 100644 --- a/module/scripts/compile.scm +++ b/module/scripts/compile.scm @@ -68,6 +68,10 @@ (if (assoc-ref result 'output-file) (fail "`-o' option cannot be specified more than once") (alist-cons 'output-file arg result)))) + (option '(#\x) #t #f + (lambda (opt name arg result) + (set! %load-extensions (cons arg %load-extensions)) + result)) (option '(#\W "warn") #t #f (lambda (opt name arg result) @@ -197,6 +201,7 @@ Compile each Guile source file FILE into a Guile object. -L, --load-path=DIR add DIR to the front of the module load path -o, --output=OFILE write output to OFILE + -x EXTENSION add EXTENSION to the set of source file extensions -W, --warn=WARNING emit warnings of type WARNING; use `--warn=help' for a list of available warnings |