From 6c9b5e24603c43539909d5e880e20aeb868787cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Thu, 20 May 2021 22:14:54 +0300 Subject: [PATCH] update Makefile --- Makefile | 33 +++++++-------------------------- README.md | 9 +++++---- 2 files changed, 12 insertions(+), 30 deletions(-) diff --git a/Makefile b/Makefile index 3e7b464..d7403eb 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,10 @@ -OSM ?= lithuania-latest.osm.pbf +# River selector (GNU Awk syntax) to refresh-rivers target. RIVERFILTER = Visinčia|Šalčia|Nemunas -SLIDES = slides-2021-03-29.pdf # Max figure size (in meters) is when it's width is TEXTWIDTH_CM on scale 1:25k SCALEDWIDTH = $(shell awk '/^TEXTWIDTH_CM/{print 25000/100*$$3}' layer2img.py) - -############################################################################## -# These variables have to come before first use due to how macros are expanded -############################################################################## - ARCHIVABLES = $(filter-out slides-2021-03-29.txt,$(shell git ls-files .)) +SLIDES = slides-2021-03-29.pdf LISTINGS = aggregate-rivers.sql wm.sql extract-and-generate @@ -268,12 +263,9 @@ mj-msc.pdf: mj-msc.tex version.inc.tex vars.inc.tex bib.bib \ $(LISTINGS) $(addsuffix .pdf,$(FIGURES)) $(addsuffix .pdf,$(RIVERS)) latexmk -shell-escape -pdf $< -############################ -# Report's test dependencies -############################ - -.PHONY: allfigs -allfigs: $(addsuffix .pdf,$(FIGURES)) $(addsuffix .pdf,$(RIVERS)) +################################### +# Report's DB and test dependencies +################################### .faux_db_pre: db init.sql bash db start @@ -318,18 +310,7 @@ slides-2021-03-29.pdf: slides-2021-03-29.txt dump-debug_wm.sql.xz: docker exec -ti wm-mj pg_dump -Uosm osm -t wm_devug | xz -v > $@ -release.zip: mj-msc.tex mj-msc.bbl version.inc.tex vars.inc.tex \ - $(addsuffix .pdf,$(FIGURES)) $(addsuffix .pdf,$(RIVERS)) \ - $(shell git ls-files .) - -rm $@ - mkdir -p .tmp; touch .tmp/editorial-version - zip $@ $^ - zip $@ -j .tmp/editorial-version - -mj-msc.bbl: mj-msc.tex bib.bib - biber mj-msc - -mj-msc-gray.pdf: mj-msc.pdf +mj-msc-gray.pdf: mj-msc.pdf ## Gray version, to inspect monochrome output gs \ -sOutputFile=$@ \ -sDEVICE=pdfwrite \ @@ -359,7 +340,7 @@ clean-tables: ## Remove tables created during unit or rivers tests .PHONY: help help: ## Print this help message @awk -F':.*?## ' '/^[a-z0-9.-]*: *.*## */{printf "%-18s %s\n",$$1,$$2}' \ - $(MAKEFILE_LIST) + $(MAKEFILE_LIST) | sort .PHONY: wc wc: mj-msc.pdf diff --git a/README.md b/README.md index 039c85d..ccd2b73 100644 --- a/README.md +++ b/README.md @@ -40,13 +40,14 @@ Running ``` # make help -mj-msc-full.pdf Thesis for publishing -test Unit tests (fast) -test-rivers Rivers tests (slow) -refresh-rivers Refresh river data from national datasets clean Clean the current working directory clean-tables Remove tables created during unit or rivers tests help Print this help message +mj-msc-full.pdf Thesis for publishing +mj-msc-gray.pdf Gray version, to inspect monochrome output +refresh-rivers Refresh river data from national datasets +test-rivers Rivers tests (slow) +test Unit tests (fast) ``` To execute the algorithm, run: