aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2023-12-18 11:35:18 -0800
committerJohn MacFarlane <[email protected]>2023-12-18 11:35:18 -0800
commit4ed45d64472d0574b90fe73d511c6b9bc2142883 (patch)
tree97a8e2bb16e16e7590c6a0e717bf7f9385acdd8c
parent72b9b3b70f75bcb61b9959541c7a6c6041b83c56 (diff)
Makefile: Add validate-epub target.
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 87398d114..2ecf26aeb 100644
--- a/Makefile
+++ b/Makefile
@@ -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)' \