summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2025-05-12 15:54:52 +0100
committerLudovic Courtès <ludo@gnu.org>2025-06-16 17:15:40 +0200
commit10527dac08bd129ecff6f963aec47f43ee632b6a (patch)
tree24cd01419a200ccd4fe1f55767dbfe05d4d3b050
parentf492b5730697a02da8b9578009cafee17b97e4c2 (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
-rw-r--r--doc/build.scm7
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/build.scm b/doc/build.scm
index f7730823186..7238c17a684 100644
--- a/doc/build.scm
+++ b/doc/build.scm
@@ -1475,7 +1475,9 @@ by 'html-identifier-indexes'."
1475 1475
1476 1476
1477(let* ((root (canonicalize-path 1477(let* ((root (canonicalize-path
1478 (string-append (current-source-directory) "/.."))) 1478 (string-append (or (current-source-directory)
1479 (string-append (getcwd) "/doc"))
1480 "/..")))
1479 (commit date (latest-commit+date root)) 1481 (commit date (latest-commit+date root))
1480 (version (or (getenv "GUIX_MANUAL_VERSION") 1482 (version (or (getenv "GUIX_MANUAL_VERSION")
1481 (string-take commit 7))) 1483 (string-take commit 7)))
@@ -1522,7 +1524,8 @@ by 'html-identifier-indexes'."
1522 (merge-index-alists guix-split-node-indexes guile-split-node-indexes)) 1524 (merge-index-alists guix-split-node-indexes guile-split-node-indexes))
1523 1525
1524 (format (current-error-port) 1526 (format (current-error-port)
1525 "building manual from work tree around commit ~a, ~a~%" 1527 "building manual from work tree (~a) around commit ~a, ~a~%"
1528 root
1526 commit 1529 commit
1527 (let* ((time (make-time time-utc 0 date)) 1530 (let* ((time (make-time time-utc 0 date))
1528 (date (time-utc->date time))) 1531 (date (time-utc->date time)))