structure Makefile a bit differently
This commit is contained in:
parent
4f91a62520
commit
b7208b0692
71
IV/Makefile
71
IV/Makefile
@ -7,13 +7,13 @@ NON_ARCHIVABLES = notes.txt referatui.txt slides-2021-03-29.txt
|
||||
ARCHIVABLES = $(filter-out $(NON_ARCHIVABLES),$(shell git ls-files .))
|
||||
|
||||
FIGURES = test-figures \
|
||||
fig6-self-crossing-before \
|
||||
fig6-self-crossing-after \
|
||||
fig8-definition-of-a-bend \
|
||||
fig5-gentle-inflection-before \
|
||||
fig5-gentle-inflection-after \
|
||||
inflection-1-gentle-inflection-before \
|
||||
inflection-1-gentle-inflection-after
|
||||
inflection-1-gentle-inflection-after \
|
||||
fig6-self-crossing-before \
|
||||
fig6-self-crossing-after
|
||||
|
||||
.PHONY: test
|
||||
test: .faux_test
|
||||
@ -22,23 +22,6 @@ test: .faux_test
|
||||
test-integration: .faux_filter-rivers
|
||||
./db -f tests-integration.sql
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
-./db stop
|
||||
-rm -r .faux_test .faux_filter-rivers .faux_import-osm .faux_db \
|
||||
version.inc.tex vars.inc.tex version.aux version.fdb_latexmk \
|
||||
_minted-mj-msc \
|
||||
$(shell git ls-files -o mj-msc*) \
|
||||
$(addsuffix .pdf,$(FIGURES)) \
|
||||
$(SLIDES)
|
||||
|
||||
.PHONY: clean-tables
|
||||
clean-tables:
|
||||
for t in $$(./db -c '\dt' | awk '/\ywm_\w+\y/{print $$3}'); do \
|
||||
./db -c "drop table $$t"; \
|
||||
done
|
||||
-rm .faux_test
|
||||
|
||||
.PHONY: slides
|
||||
slides: $(SLIDES)
|
||||
|
||||
@ -93,17 +76,6 @@ fig6-self-crossing-after_1SELECT = wm_debug where name='fig6' AND stage='dcrossi
|
||||
./db -f tests.sql
|
||||
touch $@
|
||||
|
||||
.faux_filter-rivers: .faux_import-osm Makefile
|
||||
./db -v where="$(WHERE)" -f aggregate-rivers.sql
|
||||
touch $@
|
||||
|
||||
.faux_import-osm: $(SOURCE) .faux_db
|
||||
PGPASSWORD=osm osm2pgsql \
|
||||
-c --multi-geometry \
|
||||
-H 127.0.0.1 -d osm -U osm \
|
||||
$<
|
||||
touch $@
|
||||
|
||||
.faux_db:
|
||||
./db start
|
||||
touch $@
|
||||
@ -118,12 +90,6 @@ version.inc.tex: Makefile $(shell git rev-parse --git-dir 2>/dev/null)
|
||||
vars.inc.tex: vars.awk wm.sql Makefile
|
||||
awk -f $< wm.sql
|
||||
|
||||
slides-2021-03-29.pdf: slides-2021-03-29.txt
|
||||
pandoc -t beamer -i $< -o $@
|
||||
|
||||
dump-debug_wm.sql.xz:
|
||||
docker exec -ti wm-mj pg_dump -Uosm osm -t debug_wm | xz -v > $@
|
||||
|
||||
mj-msc-gray.pdf: mj-msc.pdf
|
||||
gs \
|
||||
-sOutputFile=$@ \
|
||||
@ -143,3 +109,34 @@ mj-msc-full.pdf: mj-msc.pdf version.inc.tex $(ARCHIVABLES)
|
||||
mv .tmp2-$@ .tmp-$@; \
|
||||
done
|
||||
mv .tmp-$@ $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
-./db stop
|
||||
-rm -r .faux_test .faux_filter-rivers .faux_import-osm .faux_db \
|
||||
version.inc.tex vars.inc.tex version.aux version.fdb_latexmk \
|
||||
_minted-mj-msc \
|
||||
$(shell git ls-files -o mj-msc*) \
|
||||
$(addsuffix .pdf,$(FIGURES)) \
|
||||
$(SLIDES)
|
||||
|
||||
.PHONY: clean-tables
|
||||
clean-tables:
|
||||
for t in $$(./db -c '\dt' | awk '/\ywm_\w+\y/{print $$3}'); do \
|
||||
./db -c "drop table $$t"; \
|
||||
done
|
||||
-rm .faux_test
|
||||
|
||||
.faux_filter-rivers: .faux_import-osm Makefile
|
||||
./db -v where="$(WHERE)" -f aggregate-rivers.sql
|
||||
touch $@
|
||||
|
||||
.faux_import-osm: $(SOURCE) .faux_db
|
||||
PGPASSWORD=osm osm2pgsql -c --multi-geometry -H 127.0.0.1 -d osm -U osm $<
|
||||
touch $@
|
||||
|
||||
slides-2021-03-29.pdf: slides-2021-03-29.txt
|
||||
pandoc -t beamer -i $< -o $@
|
||||
|
||||
dump-debug_wm.sql.xz:
|
||||
docker exec -ti wm-mj pg_dump -Uosm osm -t debug_wm | xz -v > $@
|
||||
|
Loading…
Reference in New Issue
Block a user