diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-11-05 12:49:57 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-11-07 00:12:10 +0100 |
commit | c9405c461b1b37740bc0bb33c7043313978c0014 (patch) | |
tree | 273724dfab6ce89748c7ddb459f1d36b709f2c1e /guix/build/pull.scm | |
parent | 0ad5f8098292a3ed759b249acd48dc7107086c12 (diff) |
compile: Fix VPATH builds.
Fixes <https://bugs.gnu.org/29091>.
Reported by Eric Bavier <bavier@cray.com>.
* guix/build/compile.scm (relative-file): New procedure.
(load-files): Use it before calling 'file-name->module-name'.
(compile-files): Likewise before calling 'scm->go'.
* guix/build/pull.scm (build-guix): Remove 'with-directory-excursion'
and file name hack from ce33c3af76b0e5c68cc42dddf2b9c4b017386fd8.
Pass OUT to 'all-scheme-files'.
Diffstat (limited to 'guix/build/pull.scm')
-rw-r--r-- | guix/build/pull.scm | 61 |
1 files changed, 26 insertions, 35 deletions
diff --git a/guix/build/pull.scm b/guix/build/pull.scm index 3573241a7e..a011e366f6 100644 --- a/guix/build/pull.scm +++ b/guix/build/pull.scm @@ -121,41 +121,32 @@ containing the source code. Write any debugging output to DEBUG-PORT." ;; Compile the .scm files. Hide warnings. (parameterize ((current-warning-port (%make-void-port "w"))) - (with-directory-excursion out - ;; Filter out files depending on Guile-SSH when Guile-SSH is missing. - (let ((files (filter has-all-its-dependencies? - (all-scheme-files ".")))) - (compile-files out out - - ;; XXX: 'compile-files' except ready-to-use relative - ;; file names. - (map (lambda (file) - (if (string-prefix? "./" file) - (string-drop file 2) - file)) - files) - - #:workers (parallel-job-count) - - ;; Disable warnings. - #:warning-options '() - - #:report-load - (lambda (file total completed) - (display #\cr log-port) - (format log-port - "loading...\t~5,1f% of ~d files" ;FIXME: i18n - (* 100. (/ completed total)) total) - (force-output log-port) - (format debug-port "~%loading '~a'...~%" file)) - - #:report-compilation - (lambda (file total completed) - (display #\cr log-port) - (format log-port "compiling...\t~5,1f% of ~d files" ;FIXME: i18n - (* 100. (/ completed total)) total) - (force-output log-port) - (format debug-port "~%compiling '~a'...~%" file))))))) + ;; Filter out files depending on Guile-SSH when Guile-SSH is missing. + (let ((files (filter has-all-its-dependencies? + (all-scheme-files out)))) + (compile-files out out files + + #:workers (parallel-job-count) + + ;; Disable warnings. + #:warning-options '() + + #:report-load + (lambda (file total completed) + (display #\cr log-port) + (format log-port + "loading...\t~5,1f% of ~d files" ;FIXME: i18n + (* 100. (/ completed total)) total) + (force-output log-port) + (format debug-port "~%loading '~a'...~%" file)) + + #:report-compilation + (lambda (file total completed) + (display #\cr log-port) + (format log-port "compiling...\t~5,1f% of ~d files" ;FIXME: i18n + (* 100. (/ completed total)) total) + (force-output log-port) + (format debug-port "~%compiling '~a'...~%" file)))))) (newline) #t) |