build: Arrange so temporary .go files are deleted upon SIGINT.
authorLudovic Courtès <ludo@gnu.org>
Wed, 12 Oct 2016 12:55:32 +0000 (14:55 +0200)
committerLudovic Courtès <ludo@gnu.org>
Wed, 12 Oct 2016 21:35:41 +0000 (23:35 +0200)
* build-aux/compile-all.scm: Install SIGINT handler.

build-aux/compile-all.scm

index 46b3817..6ce4040 100644 (file)
                         #: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)))