aboutsummaryrefslogtreecommitdiff
path: root/doc/manual/local.mk
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2023-01-03 11:36:01 +0100
committerRobert Hensing <robert@roberthensing.nl>2023-01-10 22:30:41 +0100
commitda4d4feacf76a829ee7929c3d69f6f3d6ba86f1f (patch)
treeadd8f9d72bd5c7f4055fb1fad3fe0bda0ed90634 /doc/manual/local.mk
parentfefa3a49ce67998923af0b6c927cb9cea1f4ceaa (diff)
doc/manual/hacking: Document @docroot@ variable
Diffstat (limited to 'doc/manual/local.mk')
-rw-r--r--doc/manual/local.mk3
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/manual/local.mk b/doc/manual/local.mk
index 7639f510a..190f0258a 100644
--- a/doc/manual/local.mk
+++ b/doc/manual/local.mk
@@ -51,11 +51,13 @@ $(d)/src/SUMMARY.md: $(d)/src/SUMMARY.md.in $(d)/src/command-ref/new-cli
$(d)/src/command-ref/new-cli: $(d)/nix.json $(d)/generate-manpage.nix $(bindir)/nix
@rm -rf $@
$(trace-gen) $(nix-eval) --write-to $@.tmp --expr 'import doc/manual/generate-manpage.nix { toplevel = builtins.readFile $<; }'
+ # @docroot@: https://nixos.org/manual/nix/unstable/contributing/hacking.html#docroot-variable
$(trace-gen) sed -i $@.tmp/*.md -e 's^@docroot@^../..^g'
@mv $@.tmp $@
$(d)/src/command-ref/conf-file.md: $(d)/conf-file.json $(d)/generate-options.nix $(d)/src/command-ref/conf-file-prefix.md $(bindir)/nix
@cat doc/manual/src/command-ref/conf-file-prefix.md > $@.tmp
+ # @docroot@: https://nixos.org/manual/nix/unstable/contributing/hacking.html#docroot-variable
$(trace-gen) $(nix-eval) --expr 'import doc/manual/generate-options.nix (builtins.fromJSON (builtins.readFile $<))' \
| sed -e 's^@docroot@^..^g'>> $@.tmp
@mv $@.tmp $@
@@ -70,6 +72,7 @@ $(d)/conf-file.json: $(bindir)/nix
$(d)/src/language/builtins.md: $(d)/builtins.json $(d)/generate-builtins.nix $(d)/src/language/builtins-prefix.md $(bindir)/nix
@cat doc/manual/src/language/builtins-prefix.md > $@.tmp
+ # @docroot@: https://nixos.org/manual/nix/unstable/contributing/hacking.html#docroot-variable
$(trace-gen) $(nix-eval) --expr 'import doc/manual/generate-builtins.nix (builtins.fromJSON (builtins.readFile $<))' \
| sed -e 's^@docroot@^..^g' >> $@.tmp
@cat doc/manual/src/language/builtins-suffix.md >> $@.tmp