From 7318e9079ec216226d3c689ed9d3d7949a778451 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Tue, 14 Aug 2018 10:58:02 +0200 Subject: [PATCH] mescc: Support -o-. * module/mescc/mescc.scm (GUILE-with-output-to-file): New variable. (with-output-to-file): Use it in redefined function. --- module/mescc/mescc.scm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module/mescc/mescc.scm b/module/mescc/mescc.scm index fc51a787..ac0995a4 100644 --- a/module/mescc/mescc.scm +++ b/module/mescc/mescc.scm @@ -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)))