tidy up Makefile

This commit is contained in:
Motiejus Jakštys 2021-04-06 09:17:53 +03:00
parent acea8cf54d
commit 6b77064abf

View File

@ -1,15 +1,10 @@
SOURCE ?= lithuania-latest.osm.pbf SOURCE ?= lithuania-latest.osm.pbf
WHERE ?= name='Visinčia' OR name='Šalčia' OR name='Nemunas' OR name='Žeimena' OR name='Lakaja' WHERE ?= name='Visinčia' OR name='Šalčia' OR name='Nemunas' OR name='Žeimena' OR name='Lakaja'
SLIDES = slides-2021-03-29.pdf SLIDES = slides-2021-03-29.pdf
NON_ARCHIVABLES = notes.txt referatui.txt slides-2021-03-29.txt NON_ARCHIVABLES = notes.txt referatui.txt slides-2021-03-29.txt
ARCHIVABLES = $(filter-out $(NON_ARCHIVABLES),$(shell git ls-files .)) ARCHIVABLES = $(filter-out $(NON_ARCHIVABLES),$(shell git ls-files .))
GIT_DEP=
ifeq ($(shell git rev-parse --is-inside-git-dir),true)
GIT_DEP=$(shell git rev-parse --show-toplevel)/.git
endif
.PHONY: test .PHONY: test
test: .faux_test test: .faux_test
@ -73,18 +68,11 @@ $(SOURCE):
wget http://download.geofabrik.de/europe/$@ wget http://download.geofabrik.de/europe/$@
REF = $(shell git describe --abbrev=12 --always --dirty) REF = $(shell git describe --abbrev=12 --always --dirty)
version.tex: Makefile $(GIT_DEP) version.tex: Makefile $(shell git rev-parse --git-dir 2>/dev/null)
( \ TZ=UTC date '+\gdef\VCDescribe{%F ($(REF))}%' > $@
TZ=UTC date '+\gdef\VCDescribe{%F ($(REF))}%'; \
) > $@
# slides
slides-2021-03-29.pdf: slides-2021-03-29.txt slides-2021-03-29.pdf: slides-2021-03-29.txt
pandoc -t beamer -i $< -o $@ pandoc -t beamer -i $< -o $@
slides-2021-03-29.html: slides-2021-03-29.txt
pandoc --verbose -t slidy --self-contained $< -o $@ $(SLIDY_ARGS)
dump-debug_wm.sql.xz: dump-debug_wm.sql.xz:
docker exec -ti wm-mj \ docker exec -ti wm-mj pg_dump -Uosm osm -t debug_wm | xz -v > $@
pg_dump -Uosm osm -t debug_wm | xz > $@