summaryrefslogtreecommitdiff
path: root/support/tikztosvg/Makefile
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-03-31 03:01:24 +0000
committerNorbert Preining <norbert@preining.info>2021-03-31 03:01:24 +0000
commitd7fa794917856c6236da25ad082a9a52f2e73ffc (patch)
tree2de4151885f2dd8197b3041099af17b257a7899b /support/tikztosvg/Makefile
parent93809c868bf15852ddc7b50542713131a5d8c05f (diff)
CTAN sync 202103310301
Diffstat (limited to 'support/tikztosvg/Makefile')
-rw-r--r--support/tikztosvg/Makefile55
1 files changed, 25 insertions, 30 deletions
diff --git a/support/tikztosvg/Makefile b/support/tikztosvg/Makefile
index bae45ce4e3..ce66f807b6 100644
--- a/support/tikztosvg/Makefile
+++ b/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