git.iko.soy/typeable/nixpkgs
on master help sign in
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

commit29c320f9a6ab919b5d7bccea8e68c0f1ca74ad0d authorVincent Ambo <mail@tazj.in> dateFri 1 Feb 2019, 11:45 (8 years ago) parent3613654
1 file changed+10−4
doc/Makefile+10−4
doc/Makefile+10−4
@@ -21,7 +21,7 @@ fix-misc-xml:
2121
2222.PHONY: clean
2323clean:
24− rm -f ${MD_TARGETS} .version manual-full.xml functions/library/locations.xml
24+ rm -f ${MD_TARGETS} .version manual-full.xml functions/library/locations.xml functions/library/generated
2525 rm -rf ./out/ ./highlightjs
2626
2727.PHONY: validate
@@ -71,16 +71,22 @@ highlightjs:
7171 cp -r "$$HIGHLIGHTJS/loader.js" highlightjs/
7272
7373
74−manual-full.xml: ${MD_TARGETS} .version functions/library/locations.xml *.xml **/*.xml **/**/*.xml
74+manual-full.xml: ${MD_TARGETS} .version functions/library/locations.xml functions/library/generated *.xml **/*.xml **/**/*.xml
7575 xmllint --nonet --xinclude --noxincludenode manual.xml --output manual-full.xml
7676
7777.version:
7878 nix-instantiate --eval \
7979 -E '(import ../lib).version' > .version
8080
81+function_locations := $(shell nix-build --no-out-link ./lib-function-locations.nix)
82+
8183functions/library/locations.xml:
82− nix-build ./lib-function-locations.nix \
83− --out-link ./functions/library/locations.xml
84+ ln -s $(function_locations) ./functions/library/locations.xml
85+
86+functions/library/generated:
87+ nix-build ./lib-function-docs.nix \
88+ --arg locationsXml $(function_locations)\
89+ --out-link ./functions/library/generated
8490
8591%.section.xml: %.section.md
8692 pandoc $^ -w docbook+smart \