name the test for output going to stdout
-o - was taught to two copies of it.
This commit is contained in:
7
sexc.scm
7
sexc.scm
@@ -142,8 +142,11 @@
|
|||||||
'stdin
|
'stdin
|
||||||
(car rest-args))))
|
(car rest-args))))
|
||||||
|
|
||||||
|
(define (stdout-output? output)
|
||||||
|
(or (eq? output 'default) (equal? output "-")))
|
||||||
|
|
||||||
(define (write-to-file-or-stdout output what)
|
(define (write-to-file-or-stdout output what)
|
||||||
(if (or (eq? output 'default) (equal? output "-"))
|
(if (stdout-output? output)
|
||||||
(what)
|
(what)
|
||||||
(with-output-to-file output
|
(with-output-to-file output
|
||||||
(fn (what)))))
|
(fn (what)))))
|
||||||
@@ -169,7 +172,7 @@
|
|||||||
modules)))))
|
modules)))))
|
||||||
|
|
||||||
(define (write-dependencies depfile output input)
|
(define (write-dependencies depfile output input)
|
||||||
(when (or (eq? output 'default) (equal? output "-"))
|
(when (stdout-output? output)
|
||||||
(error "--depfile needs -o, to name what depends on the modules"))
|
(error "--depfile needs -o, to name what depends on the modules"))
|
||||||
(with-output-to-file depfile
|
(with-output-to-file depfile
|
||||||
(lambda ()
|
(lambda ()
|
||||||
|
|||||||
Reference in New Issue
Block a user