]> mj.ucw.cz Git - ucwmac.git/blobdiff - Makefile
Released version 1.99 (a preview of 2.0)
[ucwmac.git] / Makefile
index 97fd81515405aa4510332232b441353ba7b8d3ef..eaf18f8f80ecb2b9899b19e7404720a7c5dd0ad9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,49 @@
-all: test.ps
+VERSION=1.99
+ARCHIVE=ucwmac-$(VERSION).tar.gz
 
-include ../Makefile
+all: test.pdf test-labels.pdf test-ref.pdf
+
+MACROS=$(wildcard ucw*.tex)
+
+ifdef USE_LUATEX
+
+LUATEX?=luatex
+export TEXINPUTS=.//:
+export LUAINPUTS=.//:
+
+%.pdf: %.tex $(MACROS) ucw-luacsplain.fmt
+       $(LUATEX) -file-line-error -fmt ucw-luacsplain $<
+       $(LUATEX) -file-line-error -fmt ucw-luacsplain $<
+
+%.fmt: %.ini
+       $(LUATEX) -file-line-error -jobname $* -ini $<
+
+.SECONDARY: ucw-luacsplain.fmt
+
+else ifdef USE_DVI
+
+%.dvi: %.tex $(MACROS)
+       csplain -file-line-error $<
+       csplain -file-line-error $<
+
+%.pdf: %.dvi
+       dvipdfm -r 600 -o $@ -p a4 $<
+
+else
+
+%.pdf: %.tex $(MACROS)
+       pdfcsplain -file-line-error $<
+       pdfcsplain -file-line-error $<
+
+endif
+
+clean:
+       rm -f *~ *.log *.dvi *.ps *.pdf *.aux *.fmt
+
+release:
+       git tag v$(VERSION)
+       git push --tags
+       git archive --format=tar --prefix=ucwmac-$(VERSION)/ HEAD | gzip >$(ARCHIVE)
+       scp $(ARCHIVE) atrey:~ftp/pub/local/mj/tex/
+       ssh jw "cd web && bin/release-prog ucwmac $(VERSION)"
+       mv $(ARCHIVE) ~/archives/mj/