2020-05-25 12:48:19 +03:00
|
|
|
TOLERANCES = 0 500 1000
|
|
|
|
|
|
|
|
GEN = $(addsuffix .pdf,zeimena \
|
|
|
|
$(addprefix douglas-,$(TOLERANCES)) \
|
|
|
|
$(addprefix visvalingam-,$(TOLERANCES)))
|
2020-05-22 10:19:17 +03:00
|
|
|
|
|
|
|
mj-referatas.pdf: mj-referatas.tex version.tex bib.bib zeimena-pretty.pdf $(GEN)
|
|
|
|
latexmk -g -pdf $<
|
|
|
|
|
2020-05-25 12:39:50 +03:00
|
|
|
zeimena.pdf: zeimena.gpkg layer2img.py
|
2020-05-22 10:19:17 +03:00
|
|
|
./layer2img.py --infile=$< --size=74x52 --outfile $@
|
|
|
|
|
2020-05-25 12:39:50 +03:00
|
|
|
douglas-%.pdf: layer2img.py db/.faux_douglas-%
|
2020-05-22 10:19:17 +03:00
|
|
|
./layer2img.py --table=douglas_$* --size=74x52 --outfile $@
|
|
|
|
|
2020-05-25 12:48:19 +03:00
|
|
|
visvalingam-%.pdf: layer2img.py db/.faux_visvalingam-%
|
|
|
|
./layer2img.py --table=visvalingam_$* --size=74x52 --outfile $@
|
|
|
|
|
|
|
|
db/.faux_visvalingam-%: visvalingam.sql db/.faux_ready
|
|
|
|
./managedb -- --echo-all -v ON_ERROR_STOP=1 -v tolerance=$* -f $<
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
db/.faux_douglas-%: douglas.sql db/.faux_ready
|
|
|
|
./managedb -- --echo-all -v ON_ERROR_STOP=1 -v tolerance=$* -f $<
|
2020-05-22 10:19:17 +03:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
db/.faux_ready: zeimena.gpkg managedb
|
|
|
|
-./managedb stop; rm -fr db
|
|
|
|
./managedb init
|
|
|
|
ogr2ogr -f PostgreSQL "PG:host=127.0.0.1 user=osm dbname=osm" zeimena.gpkg
|
|
|
|
touch $@
|
|
|
|
|
2020-05-22 22:20:47 +03:00
|
|
|
REF = $(shell git describe --tags)
|
2020-05-22 22:18:15 +03:00
|
|
|
DIRTY = $(shell git status --porcelain | awk 'NR==1{print "-dirty";exit}')
|
2020-05-22 10:19:17 +03:00
|
|
|
GIT_DIR = $(shell git rev-parse --show-toplevel)/.git
|
|
|
|
version.tex: $(shell git ls-files .) $(GIT_DIR)
|
2020-05-22 22:20:47 +03:00
|
|
|
( \
|
|
|
|
date '+\gdef\GeneratedAt{%F %T %Z}%'; \
|
|
|
|
printf '\gdef\VCDescribe{%s%s}%%\n' $(REF) $(DIRTY); \
|
|
|
|
) > $@
|