diff options
| author | Christopher Baines <mail@cbaines.net> | 2025-05-12 15:54:52 +0100 |
|---|---|---|
| committer | Christopher Baines <mail@cbaines.net> | 2025-05-12 15:54:52 +0100 |
| commit | 8a7e623eeb6eef189652da3a4792ca494b80d920 (patch) | |
| tree | 94eef56773f804bcec04ea23df87fdbc6a74a445 /doc/build.scm | |
| parent | bf11e3327b64dbaaab9b6a688f2f1f9871c9d63d (diff) | |
doc: build.scm: Handle (current-source-directory) being #f.
Since this seems to be the case when the devel manual is being built on
bayfront.
* doc/build.scm: Use the current working directory as a fallback
if (current-source-directory) is #f, and log the value of root.
Change-Id: Ic43fd05a4a0822d9efb935069850f0a8cadd80aa
Diffstat (limited to 'doc/build.scm')
| -rw-r--r-- | doc/build.scm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/build.scm b/doc/build.scm index 9088e99e535..2b081ae29c9 100644 --- a/doc/build.scm +++ b/doc/build.scm | |||
| @@ -1365,7 +1365,9 @@ by 'html-identifier-indexes'." | |||
| 1365 | 1365 | ||
| 1366 | 1366 | ||
| 1367 | (let* ((root (canonicalize-path | 1367 | (let* ((root (canonicalize-path |
| 1368 | (string-append (current-source-directory) "/.."))) | 1368 | (string-append (or (current-source-directory) |
| 1369 | (string-append (getcwd) "/doc")) | ||
| 1370 | "/.."))) | ||
| 1369 | (commit date (latest-commit+date root)) | 1371 | (commit date (latest-commit+date root)) |
| 1370 | (version (or (getenv "GUIX_MANUAL_VERSION") | 1372 | (version (or (getenv "GUIX_MANUAL_VERSION") |
| 1371 | (string-take commit 7))) | 1373 | (string-take commit 7))) |
| @@ -1412,7 +1414,8 @@ by 'html-identifier-indexes'." | |||
| 1412 | (merge-index-alists guix-split-node-indexes guile-split-node-indexes)) | 1414 | (merge-index-alists guix-split-node-indexes guile-split-node-indexes)) |
| 1413 | 1415 | ||
| 1414 | (format (current-error-port) | 1416 | (format (current-error-port) |
| 1415 | "building manual from work tree around commit ~a, ~a~%" | 1417 | "building manual from work tree (~a) around commit ~a, ~a~%" |
| 1418 | root | ||
| 1416 | commit | 1419 | commit |
| 1417 | (let* ((time (make-time time-utc 0 date)) | 1420 | (let* ((time (make-time time-utc 0 date)) |
| 1418 | (date (time-utc->date time))) | 1421 | (date (time-utc->date time))) |
