aboutsummaryrefslogtreecommitdiff
path: root/doc/manual
diff options
context:
space:
mode:
Diffstat (limited to 'doc/manual')
-rw-r--r--doc/manual/local.mk24
-rw-r--r--doc/manual/src/installation/prerequisites-source.md9
-rw-r--r--doc/manual/theme/highlight.js (renamed from doc/manual/highlight.pack.js)0
3 files changed, 12 insertions, 21 deletions
diff --git a/doc/manual/local.mk b/doc/manual/local.mk
index 435301279..ca9af9c4a 100644
--- a/doc/manual/local.mk
+++ b/doc/manual/local.mk
@@ -1,9 +1,5 @@
ifeq ($(doc_generate),yes)
-ALL_MD_FILES := $(call rwildcard, $(d)/src, *.md)
-GENERATED_MD_FILES := $(call rwildcard, $(d)/src/command-ref/new-cli, *.md)
-MANUAL_SRCS := $(filter-out $(GENERATED_MD_FILES), $(ALL_MD_FILES))
-
# Generate man pages.
man-pages := $(foreach n, \
nix-env.1 nix-build.1 nix-shell.1 nix-store.1 nix-instantiate.1 \
@@ -77,24 +73,28 @@ $(d)/builtins.json: $(bindir)/nix
install: $(docdir)/manual/index.html
# Generate 'nix' manpages.
-install: $(mandir)/man1/nix3-build.1
+install: $(mandir)/man1/nix3-manpages
+man: doc/manual/generated/man1/nix3-manpages
+all: doc/manual/generated/man1/nix3-manpages
+
+$(mandir)/man1/nix3-manpages: doc/manual/generated/man1/nix3-manpages
+ @mkdir -p $(DESTDIR)$$(dirname $@)
+ $(trace-install) install -m 0644 $$(dirname $<)/* $(DESTDIR)$$(dirname $@)
-# Technically this rule generates all the `nix3-*` manpages, but since we don’t
-# know their list statically and they are all generated at once anyways, we can
-# just be dirty and only track one
-$(mandir)/man1/nix3-build.1: $(d)/src/command-ref/new-cli
+doc/manual/generated/man1/nix3-manpages: $(d)/src/command-ref/new-cli
+ @mkdir -p $(DESTDIR)$$(dirname $@)
$(trace-gen) for i in doc/manual/src/command-ref/new-cli/*.md; do \
name=$$(basename $$i .md); \
tmpFile=$$(mktemp); \
if [[ $$name = SUMMARY ]]; then continue; fi; \
printf "Title: %s\n\n" "$$name" > $$tmpFile; \
cat $$i >> $$tmpFile; \
- lowdown -sT man -M section=1 $$tmpFile -o $(mandir)/man1/$$name.1; \
+ lowdown -sT man -M section=1 $$tmpFile -o $(DESTDIR)$$(dirname $@)/$$name.1; \
rm $$tmpFile; \
done
+ touch $@
$(docdir)/manual/index.html: $(MANUAL_SRCS) $(d)/book.toml $(d)/custom.css $(d)/src/SUMMARY.md $(d)/src/command-ref/new-cli $(d)/src/command-ref/conf-file.md $(d)/src/expressions/builtins.md
- $(trace-gen) RUST_LOG=warn mdbook build doc/manual -d $(docdir)/manual
- @cp doc/manual/highlight.pack.js $(docdir)/manual/highlight.js
+ $(trace-gen) RUST_LOG=warn mdbook build doc/manual -d $(DESTDIR)$(docdir)/manual
endif
diff --git a/doc/manual/src/installation/prerequisites-source.md b/doc/manual/src/installation/prerequisites-source.md
index 6825af707..40cb79627 100644
--- a/doc/manual/src/installation/prerequisites-source.md
+++ b/doc/manual/src/installation/prerequisites-source.md
@@ -26,15 +26,6 @@
available for download from the official repository
<https://github.com/google/brotli>.
- - The bzip2 compressor program and the `libbz2` library. Thus you must
- have bzip2 installed, including development headers and libraries.
- If your distribution does not provide these, you can obtain bzip2
- from
- <https://sourceware.org/bzip2/>.
-
- - `liblzma`, which is provided by XZ Utils. If your distribution does
- not provide this, you can get it from <https://tukaani.org/xz/>.
-
- cURL and its library. If your distribution does not provide it, you
can get it from <https://curl.haxx.se/>.
diff --git a/doc/manual/highlight.pack.js b/doc/manual/theme/highlight.js
index fba8b4a5a..fba8b4a5a 100644
--- a/doc/manual/highlight.pack.js
+++ b/doc/manual/theme/highlight.js