diff options
author | Norbert Preining <preining@logic.at> | 2021-04-04 02:30:37 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2021-04-04 02:30:37 +0000 |
commit | 6aa284727262f1c7ac0ec6c67becc28d5a678a8c (patch) | |
tree | 9c53f7a539f1630757154ecc23c613c201f4457c /Master/texmf-dist/doc/support/tikztosvg/Makefile | |
parent | 335676229f823eeb4a01f85c45c66ef6988d82ac (diff) |
tikztosvg (4apr21)
git-svn-id: svn://tug.org/texlive/trunk@58737 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/support/tikztosvg/Makefile')
-rw-r--r-- | Master/texmf-dist/doc/support/tikztosvg/Makefile | 55 |
1 files changed, 25 insertions, 30 deletions
diff --git a/Master/texmf-dist/doc/support/tikztosvg/Makefile b/Master/texmf-dist/doc/support/tikztosvg/Makefile index bae45ce4e39..ce66f807b6f 100644 --- a/Master/texmf-dist/doc/support/tikztosvg/Makefile +++ b/Master/texmf-dist/doc/support/tikztosvg/Makefile @@ -1,35 +1,30 @@ +.PHONY: package install + # Packages the application for CTAN -package: - # Render the manpage - asciidoctor -b manpage -o man/tikztosvg.1 man/man.adoc +package: tikztosvg.tar.gz + +install: man/tikztosvg.1 tikztosvg + # Install the executable + cp tikztosvg ~/.local/bin/ + chmod +x ~/.local/bin/tikztosvg - # Render the README as PDF - asciidoctor -r asciidoctor-pdf -b pdf -o tikztosvg.pdf README.adoc - - # Render the README as Markdown - asciidoctor -b docbook -a leveloffset=+1 -o - README.adoc \ - | pandoc --atx-headers \ - --wrap=preserve \ - -t markdown_github \ - -f docbook - \ - | comby '![:[name]](:[link])' \ - '![:[name]](examples/:[link])' \ - -stdin \ - -stdout \ - -m .md \ - | comby ':imagesdir: :[[value]]' '' -stdin -stdout -m .md \ - | comby ':source-highlighter: :[[value]]' '' -stdin -stdout -m .md \ - > README.md + # Install the manpage + install -g 0 -o 0 -m 0644 man/tikztosvg.1 ~/.local/share/man/man1/ + +man/tikztosvg.1: man/man.adoc + asciidoctor -b manpage -o $@ $^ + +tikztosvg.pdf: README.md + pandoc -s -o $@ $^ + +example/example.svg: example/example.tikz + sh ./tikztosvg -p xfrac -p relsize -o $@ $^ - # Package the repository as a tar file - tar -cvO \ - --directory=.. \ - --exclude='.*' \ - --exclude='*.tar.gz' \ - --exclude='README.adoc' \ - tikztosvg \ - | gzip -c /dev/stdin > tikztosvg.tar.gz + # Try to compress the image with svgo + svgo --pretty --enable=sortAttrs $@ || exit 0 -install: - sh install.sh +# Packages the application for CTAN +tikztosvg.tar.gz: man/tikztosvg.1 tikztosvg.pdf README.md example/example.svg CHANGELOG.md + tar -cvO --directory=.. --exclude='.*' --exclude='*.tar.gz' tikztosvg \ + | gzip -c /dev/stdin > tikztosvg.tar.gz |