~ruther/guix-local

402bb3b9f7eaaa66f2652fda2d9e0d2e34cf59f8 — Ludovic Courtès 9 years ago eb419bc
build: Arrange so temporary .go files are deleted upon SIGINT.

* build-aux/compile-all.scm: Install SIGINT handler.
1 files changed, 6 insertions(+), 0 deletions(-)

M build-aux/compile-all.scm
M build-aux/compile-all.scm => build-aux/compile-all.scm +6 -0
@@ 76,6 76,12 @@
                        #:output-file go
                        #:opts `(#:warnings ,warnings)))))))

;; Install a SIGINT handler to give unwind handlers in 'compile-file' an
;; opportunity to run upon SIGINT and to remove temporary output files.
(sigaction SIGINT
  (lambda args
    (exit 1)))

(match (command-line)
  ((_ . files)
   (let ((files (filter file-needs-compilation? files)))