1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-16 16:50:21 +02:00

Add -o'/--output' option to "guile-tools compile".

* module/system/base/compile.scm (compile-file): Add optional
  OUTPUT-FILE argument.

* scripts/compile (fail): New procedure.
  (%options): Add `-o'/`--output' option.
  (compile): Handle `-o'.
This commit is contained in:
Ludovic Courtès 2009-02-21 00:36:29 +01:00
parent 3bef3ae428
commit 73f4d8d1d2
2 changed files with 27 additions and 5 deletions

View file

@ -88,8 +88,9 @@
x
(lookup-language x)))
(define* (compile-file file #:key (to 'objcode) (opts '()))
(let ((comp (compiled-file-name file))
(define* (compile-file file #:optional output-file
#:key (to 'objcode) (opts '()))
(let ((comp (or output-file (compiled-file-name file)))
(lang (ensure-language (current-language)))
(to (ensure-language to)))
(catch 'nothing-at-all