mescc: Support -o-.

* module/mescc/mescc.scm (GUILE-with-output-to-file): New variable.
(with-output-to-file): Use it in redefined function.
This commit is contained in:
Jan Nieuwenhuizen 2018-08-14 10:58:02 +02:00
parent 0a47b152b2
commit 7318e9079e
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
1 changed files with 5 additions and 0 deletions

View File

@ -32,6 +32,11 @@
mescc:assemble
mescc:link))
(define GUILE-with-output-to-file with-output-to-file)
(define (with-output-to-file file-name thunk)
(if (equal? file-name "-") (thunk)
(GUILE-with-output-to-file file-name thunk)))
(define (mescc:preprocess options)
(let* ((defines (reverse (filter-map (multi-opt 'define) options)))
(includes (reverse (filter-map (multi-opt 'include) options)))