diff options
author | Ludovic Courtès <ludo@gnu.org> | 2021-07-18 16:05:21 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2021-07-18 19:50:01 +0200 |
commit | 0e47fcced442d8e7c1b05184fdc1c14f10ed04ec (patch) | |
tree | 4ae844bc0ec3c670f8697bdc24362c122fa718ad /build-aux | |
parent | e4b70bc55a538569465bcedee19d1f2607308e65 (diff) | |
parent | 8b1bde7bb3936a64244824500ffe60f123704437 (diff) | |
download | guix-patches-0e47fcced442d8e7c1b05184fdc1c14f10ed04ec.tar guix-patches-0e47fcced442d8e7c1b05184fdc1c14f10ed04ec.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'build-aux')
-rw-r--r-- | build-aux/compile-all.scm | 46 |
1 files changed, 28 insertions, 18 deletions
diff --git a/build-aux/compile-all.scm b/build-aux/compile-all.scm index e6982f50fb..9ffbce43ad 100644 --- a/build-aux/compile-all.scm +++ b/build-aux/compile-all.scm @@ -98,26 +98,36 @@ to 'make'." (exit 1))) (match (command-line) - ((_ . files) + ((_ "--total" (= string->number grand-total) + "--completed" (= string->number processed) + . files) + ;; GRAND-TOTAL is the total number of .scm files in the project; PROCESSED + ;; is the total number of .scm files already compiled in previous + ;; invocations of this script. (catch #t (lambda () - (compile-files srcdir (getcwd) - (filter file-needs-compilation? files) - #:workers (parallel-job-count*) - #:host host - #:report-load (lambda (file total completed) - (when file - (format #t "[~3d%] LOAD ~a~%" - (% (+ 1 completed) (* 2 total)) - file) - (force-output))) - #:report-compilation (lambda (file total completed) - (when file - (format #t "[~3d%] GUILEC ~a~%" - (% (+ total completed 1) - (* 2 total)) - (scm->go file)) - (force-output))))) + (let* ((to-build (filter file-needs-compilation? files)) + (processed (+ processed + (- (length files) (length to-build))))) + (compile-files srcdir (getcwd) to-build + #:workers (parallel-job-count*) + #:host host + #:report-load (lambda (file total completed) + (when file + (format #t "[~3d%] LOAD ~a~%" + (% (+ 1 completed + (* 2 processed)) + (* 2 grand-total)) + file) + (force-output))) + #:report-compilation (lambda (file total completed) + (when file + (format #t "[~3d%] GUILEC ~a~%" + (% (+ total completed 1 + (* 2 processed)) + (* 2 grand-total)) + (scm->go file)) + (force-output)))))) (lambda _ (primitive-exit 1)) (lambda args |