From e6aab36d60e8c5d6dd912a966120d7f7dcff98b5 Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Mon, 8 Apr 2024 17:57:38 +0200 Subject: [PATCH] docs: put the manual build into a known tmpdir this isn't strictly necessary, but it'll make it a lot easier to put the generated files used by the autoconf build system in this directory too. doing this now already will make the meson transition a lot easier later Change-Id: I5fb39eade2ff88b6093c9ee436c9e8db793e9448 --- doc/manual/local.mk | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/doc/manual/local.mk b/doc/manual/local.mk index 45b508eb8..13ab6da2f 100644 --- a/doc/manual/local.mk +++ b/doc/manual/local.mk @@ -147,16 +147,15 @@ doc/manual/generated/man1/nix3-manpages: $(d)/src/command-ref/new-cli done @touch $@ -$(docdir)/manual/index.html: $(MANUAL_SRCS) $(d)/book.toml $(d)/anchors.jq $(d)/custom.css $(d)/src/SUMMARY.md $(d)/src/command-ref/new-cli $(d)/src/contributing/experimental-feature-descriptions.md $(d)/src/command-ref/conf-file.md $(d)/src/language/builtins.md $(d)/src/language/builtin-constants.md $(d)/src/release-notes/rl-next-generated.md $(d)/docroot.py +doc/manual/generated/out: $(MANUAL_SRCS) $(d)/book.toml $(d)/anchors.jq $(d)/custom.css $(d)/src/SUMMARY.md $(d)/src/command-ref/new-cli $(d)/src/contributing/experimental-feature-descriptions.md $(d)/src/command-ref/conf-file.md $(d)/src/language/builtins.md $(d)/src/language/builtin-constants.md $(d)/src/release-notes/rl-next-generated.md $(d)/docroot.py + @rm -rf $@ $(trace-gen) \ - tmp="$$(mktemp -d)"; \ - cp -r doc/manual "$$tmp"; \ - set -euo pipefail; \ - RUST_LOG=warn mdbook build "$$tmp/manual" -d $(DESTDIR)$(docdir)/manual.tmp 2>&1 \ - | { grep -Fv "because fragment resolution isn't implemented" || :; }; \ - rm -rf "$$tmp/manual" + RUST_LOG=warn mdbook build doc/manual -d generated/out 2>&1 \ + | { grep -Fv "because fragment resolution isn't implemented" || :; } + +$(docdir)/manual/index.html: doc/manual/generated/out + @mkdir -p $(DESTDIR)$(docdir) @rm -rf $(DESTDIR)$(docdir)/manual - @mv $(DESTDIR)$(docdir)/manual.tmp/html $(DESTDIR)$(docdir)/manual - @rm -rf $(DESTDIR)$(docdir)/manual.tmp + @cp -r $