summary refs log tree commit diff
path: root/doc/Makefile
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2019-02-01 11:45:30 +0100
committerVincent Ambo <mail@tazj.in>2019-02-01 11:45:30 +0100
commit29c320f9a6ab919b5d7bccea8e68c0f1ca74ad0d (patch)
tree408d38a5ae2118c1e8c60254201f48242122f7bf /doc/Makefile
parent3613654a1fe8b49704f34c40047e6e1392164ead (diff)
downloadnixpkgs-29c320f9a6ab919b5d7bccea8e68c0f1ca74ad0d.tar
nixpkgs-29c320f9a6ab919b5d7bccea8e68c0f1ca74ad0d.tar.gz
nixpkgs-29c320f9a6ab919b5d7bccea8e68c0f1ca74ad0d.tar.bz2
nixpkgs-29c320f9a6ab919b5d7bccea8e68c0f1ca74ad0d.tar.lz
nixpkgs-29c320f9a6ab919b5d7bccea8e68c0f1ca74ad0d.tar.xz
nixpkgs-29c320f9a6ab919b5d7bccea8e68c0f1ca74ad0d.tar.zst
nixpkgs-29c320f9a6ab919b5d7bccea8e68c0f1ca74ad0d.zip
doc: Include function doc generation in Makefile
Since #53055 was merged the Makefile for the manual could not be run
correctly as the generated function documentation was included, but
not actually generated.

This adds the necessary generation step by first building the XML file
containing function locations and preserving its store path in a
variable, which is then used both for linking of the locations file
and as a build input for the function docs generator.

This fixes #55014
Diffstat (limited to 'doc/Makefile')
-rw-r--r--doc/Makefile14
1 files changed, 10 insertions, 4 deletions
diff --git a/doc/Makefile b/doc/Makefile
index 91b62fe138b..cd6d7eb8d1c 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -21,7 +21,7 @@ fix-misc-xml:
 
 .PHONY: clean
 clean:
-	rm -f ${MD_TARGETS} .version manual-full.xml functions/library/locations.xml
+	rm -f ${MD_TARGETS} .version manual-full.xml functions/library/locations.xml functions/library/generated
 	rm -rf ./out/ ./highlightjs
 
 .PHONY: validate
@@ -71,16 +71,22 @@ highlightjs:
 	cp -r "$$HIGHLIGHTJS/loader.js" highlightjs/
 
 
-manual-full.xml: ${MD_TARGETS} .version functions/library/locations.xml *.xml **/*.xml **/**/*.xml
+manual-full.xml: ${MD_TARGETS} .version functions/library/locations.xml functions/library/generated *.xml **/*.xml **/**/*.xml
 	xmllint --nonet --xinclude --noxincludenode manual.xml --output manual-full.xml
 
 .version:
 	nix-instantiate --eval \
 		-E '(import ../lib).version' > .version
 
+function_locations := $(shell nix-build --no-out-link ./lib-function-locations.nix)
+
 functions/library/locations.xml:
-	nix-build ./lib-function-locations.nix \
-		--out-link ./functions/library/locations.xml
+	ln -s $(function_locations) ./functions/library/locations.xml
+
+functions/library/generated:
+	nix-build ./lib-function-docs.nix \
+		--arg locationsXml $(function_locations)\
+		--out-link ./functions/library/generated
 
 %.section.xml: %.section.md
 	pandoc $^ -w docbook+smart \