simplify generation rules

This commit is contained in:
Motiejus Jakštys 2020-05-25 13:04:39 +03:00
parent c4f2d0bd40
commit 605ec9919f

View File

@ -10,19 +10,22 @@ mj-referatas.pdf: mj-referatas.tex version.tex bib.bib zeimena-pretty.pdf $(GEN)
zeimena.pdf: zeimena.gpkg layer2img.py zeimena.pdf: zeimena.gpkg layer2img.py
./layer2img.py --infile=$< --size=74x52 --outfile $@ ./layer2img.py --infile=$< --size=74x52 --outfile $@
douglas-%.pdf: layer2img.py db/.faux_douglas-% define algo2layer
./layer2img.py --table=douglas_$* --size=74x52 --outfile $@ db/.faux_$(1)-%: $(1).sql db/.faux_ready
./managedb -- --echo-all -v ON_ERROR_STOP=1 -v tolerance=$$* -f $(1).sql
touch $$@
endef
visvalingam-%.pdf: layer2img.py db/.faux_visvalingam-% define layer2img
./layer2img.py --table=visvalingam_$* --size=74x52 --outfile $@ $(1)-%.pdf: layer2img.py db/.faux_$(1)-%
./layer2img.py --table=$(1)_$$* --size=74x52 --outfile $$@
endef
db/.faux_visvalingam-%: visvalingam.sql db/.faux_ready $(eval $(call layer2img,douglas))
./managedb -- --echo-all -v ON_ERROR_STOP=1 -v tolerance=$* -f $< $(eval $(call layer2img,visvalingam))
touch $@
db/.faux_douglas-%: douglas.sql db/.faux_ready $(eval $(call algo2layer,douglas))
./managedb -- --echo-all -v ON_ERROR_STOP=1 -v tolerance=$* -f $< $(eval $(call algo2layer,visvalingam))
touch $@
db/.faux_ready: zeimena.gpkg managedb db/.faux_ready: zeimena.gpkg managedb
-./managedb stop; rm -fr db -./managedb stop; rm -fr db