diff options
| author | Jonas Smedegaard <dr@jones.dk> | 2025-05-11 19:40:01 +0200 |
|---|---|---|
| committer | Jonas Smedegaard <dr@jones.dk> | 2025-05-11 19:41:10 +0200 |
| commit | 3ff58c4d9987148e20f8d00de66ea3df54ad4ea3 (patch) | |
| tree | ef6a104924822440b7166ccacfb886ed94ac7e2e /Makefile | |
| parent | 765ceca3bf63c1ea99c4060e793d96953582e19a (diff) | |
add Makefile with quarto and rdf snippets
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2238b76 --- /dev/null +++ b/Makefile @@ -0,0 +1,45 @@ +DOCUMENTS = report + +PDF_DOCUMENTS = _site/report.pdf + +include _make/*.mk + +FILTER = _extensions/ruc-play/semantic-markdown/semantic-markdown.lua + +DIFFTESTS = $(patsubst %.md,%,$(wildcard test/*.md)) + +#DIFF = diff -u +DIFF = git --no-pager diff --no-index + +#MARKDOWN_DIALECT = markdown+fenced_divs+bracketed_spans-auto_identifiers +MARKDOWN_DIALECT = commonmark + +check: $(DIFFTESTS:%=check-%) + luacheck --quiet $(FILTER) + +$(DIFFTESTS:%=check-%): check-%: %.md + -pandoc --lua-filter $(FILTER) --from $(MARKDOWN_DIALECT) \ + --wrap preserve < $< \ + | $(DIFF) $*.plain.html /dev/stdin + +$(DIFFTESTS:%=debug-%): debug-%: %.md + $(strip \ + pandoc --from $(MARKDOWN_DIALECT) --to native \ + --lua-filter $(FILTER) < $<) + +$(DIFFTESTS:%=debugdiff-%): SHELL = /bin/bash +$(DIFFTESTS:%=debugdiff-%): debugdiff-%: %.md + -$(strip $(DIFF) \ + <(pandoc --from $(MARKDOWN_DIALECT) --to native < $<) \ + <(pandoc --from $(MARKDOWN_DIALECT) --to native \ + --lua-filter $(FILTER) < $<)) + +$(DIFFTESTS:%=turtle-from-%): turtle-from-%: %.rdfa.html + rapper -i rdfa -o turtle - ex < $< + +$(DIFFTESTS:%=xmp-from-%): xmp-from-%: %.rdfa.html + rapper -i rdfa -o rdfxml-xmp - ex < $< + +.PHONY: check \ + $(foreach x,check debug debugdiff turtle-from xmp-from,\ + $(DIFFTESTS:%=$x-%)) |
