nixpkgs doc: add format Make target

This commit is contained in:
Graham Christensen
2018-04-30 22:35:54 -04:00
parent 8cb0252b1e
commit ab1648bf0d
4 changed files with 81 additions and 2 deletions

View File

@@ -1,12 +1,17 @@
MD_TARGETS=$(addsuffix .xml, $(basename $(wildcard ./*.md ./**/*.md)))
.PHONY: all
all: validate out/html/index.html out/epub/manual.epub
all: validate format out/html/index.html out/epub/manual.epub
.PHONY: debug
debug:
nix-shell --run "xmloscopy --docbook5 ./manual.xml ./manual-full.xml"
.PHONY: format
format:
find . -iname '*.xml' -type f -print0 | xargs -0 -I{} -n1 \
xmlformat --config-file "$$XMLFORMAT_CONFIG" -i {}
.PHONY: clean
clean:
rm -f ${MD_TARGETS} .version manual-full.xml