Makefile: Add validate-epub target.

This commit is contained in:
John MacFarlane
2023-12-18 11:35:18 -08:00
parent 72b9b3b70f
commit 4ed45d6447
+7
View File
@@ -242,6 +242,13 @@ validate-docx-golden-tests: ## validate docx golden tests against schema
cd docx-validator && for f in ../test/docx/golden/*.docx; do ./validate $$f || exit 1 ; done
.PHONY: validate-docx-golden-tests
validate-epub: ## generate an epub and validate it with epubcheck
which epubcheck || exit 1
tmp=$$(mktemp -d) && \
pandoc test/epub/features.native -Mtitle="Features" --resource-path test/epub -o $$tmp/file.epub --number-sections --toc --quiet && \
echo $$tmp/file.epub && \
epubcheck $$tmp/file.epub
modules.csv: $(PANDOCSOURCEFILES)
@rg '^import.*Text\.Pandoc\.' --with-filename $^ \
| rg -v 'Text\.Pandoc\.(Definition|Builder|Walk|Generic)' \