summaryrefslogtreecommitdiff
path: root/support/tikztosvg/Makefile
blob: bae45ce4e3995de5ddbadf8c4a7304c6fc58de3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Packages the application for CTAN
package:
	# Render the manpage
	asciidoctor -b manpage -o man/tikztosvg.1 man/man.adoc
	 
	# 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
	
	# 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

install:
	sh install.sh