| 1 |
PACKAGE = svg-animate |
| 2 |
VERSION = $(shell grep '\\def\\svganimateversion' $(PACKAGE).sty | sed 's/.*{\(.*\)}/\1/') |
| 3 |
|
| 4 |
.PHONY: all clean ctan |
| 5 |
|
| 6 |
all: svg-animate-example.svg svg-animate-test.svg svg-animate.pdf |
| 7 |
|
| 8 |
## Animated SVG ──────────────────────────────────────────────────────────────── |
| 9 |
|
| 10 |
svg-animate-example.dvi: svg-animate-example.tex svg-animate.sty |
| 11 |
latex $< |
| 12 |
latex $< |
| 13 |
|
| 14 |
svg-animate-example.svg: svg-animate-example.dvi |
| 15 |
dvisvgm --font-format=woff2 --optimize=all --bbox=min $< -o $@ |
| 16 |
|
| 17 |
## Static PDF of the example (included in svg-animate.pdf via \includegraphics) ──────── |
| 18 |
|
| 19 |
svg-animate-example.pdf: svg-animate-example.tex svg-animate.sty |
| 20 |
xelatex $< |
| 21 |
|
| 22 |
# ========== |
| 23 |
|
| 24 |
svg-animate-test.dvi: svg-animate-test.tex svg-animate.sty |
| 25 |
latex $< |
| 26 |
latex $< |
| 27 |
|
| 28 |
svg-animate-test.svg: svg-animate-test.dvi |
| 29 |
dvisvgm --font-format=woff2 --optimize=all --bbox=papersize $< -o $@ |
| 30 |
|
| 31 |
## Static PDF of the test (included in svg-animate.pdf via \includegraphics) ──────── |
| 32 |
|
| 33 |
svg-animate-test.pdf: svg-animate-test.tex svg-animate.sty |
| 34 |
xelatex $< |
| 35 |
|
| 36 |
|
| 37 |
# ========== |
| 38 |
## Documentation PDF ────────────────────────────────────────────────────────── |
| 39 |
|
| 40 |
svg-animate.pdf: svg-animate.tex svg-animate.sty svg-animate-example.pdf |
| 41 |
xelatex $< |
| 42 |
xelatex $< |
| 43 |
|
| 44 |
## CTAN archive ──────────────────────────────────────────────────────────────── |
| 45 |
|
| 46 |
ctan: svg-animate.pdf |
| 47 |
rm -rf $(PACKAGE)-$(VERSION) $(PACKAGE)-$(VERSION).zip |
| 48 |
git archive HEAD --prefix=$(PACKAGE)-$(VERSION)/ --format=tar | tar -x |
| 49 |
rm -f $(PACKAGE)-$(VERSION)/.gitignore |
| 50 |
zip -r $(PACKAGE)-$(VERSION).zip $(PACKAGE)-$(VERSION) |
| 51 |
rm -rf $(PACKAGE)-$(VERSION) |
| 52 |
@echo "Created $(PACKAGE)-$(VERSION).zip" |
| 53 |
|
| 54 |
## Cleanup ──────────────────────────────────────────────────────────────────── |
| 55 |
|
| 56 |
clean: |
| 57 |
rm -f *.aux *.log *.dvi *.toc *.out *.tcbtemp |
| 58 |
|
| 59 |
clean-all: clean |
| 60 |
rm -f svg-animate-example*.svg svg-animate-example*.pdf svg-animate-test*.svg svg-animate-test*.pdf svg-animate.pdf |
| 61 |
rm -f $(PACKAGE)-*.zip |
| 62 |
rm -rf $(PACKAGE)-*/ |