blob b97ce8f8502b1ce1435a3e8a6ede13c1541dbec8 1248 bytes (raw)
name: build-aux/compile-all.scm # note: path name is non-authoritative(*)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
| | (use-modules (system base target)
(ice-9 threads))
(define compile-options '(format unbound-variable arity-mismatch))
(define (file-mtime<? f1 f2)
(< (stat:mtime (stat f1))
(stat:mtime (stat f2))))
(define (scm->go file)
(string-append (string-drop-right file 4) ".go"))
(let* ((args (cdr (command-line)))
(target (car args))
(files (cdr args)))
(for-each
(lambda (file)
(let ((go (scm->go file)))
(unless (and (file-exists? go)
(file-mtime<? file go))
(format #t " LOAD ~s~%" file)
(save-module-excursion
(lambda ()
(primitive-load file))))))
files)
(with-target target
(lambda ()
(let ((mutex (make-mutex)))
(par-for-each
(lambda (file)
(let ((go (scm->go file)))
(unless (and (file-exists? go)
(file-mtime<? file go))
(with-mutex mutex
(format #t " GUILEC ~s~%" file)
(force-output))
(compile-file file #:output-file go #:opts compile-options)
(with-mutex mutex
(format #t " WROTE ~s~%" go)
(force-output)))))
files)))))
|
debug log:
solving b97ce8f ...
found b97ce8f in https://yhetil.org/guix-devel/87lha3rx04.fsf@T420.taylan/
applying [1/1] https://yhetil.org/guix-devel/87lha3rx04.fsf@T420.taylan/
diff --git a/build-aux/compile-all.scm b/build-aux/compile-all.scm
new file mode 100644
index 0000000..b97ce8f
Checking patch build-aux/compile-all.scm...
Applied patch build-aux/compile-all.scm cleanly.
index at:
100644 b97ce8f8502b1ce1435a3e8a6ede13c1541dbec8 build-aux/compile-all.scm
(*) Git path names are given by the tree(s) the blob belongs to.
Blobs themselves have no identifier aside from the hash of its contents.^
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).