simpler version.tex

This commit is contained in:
Motiejus Jakštys 2020-06-02 10:45:13 +03:00
parent f465d04a98
commit f758b1053e

View File

@ -68,11 +68,10 @@ db/.faux_ready: zeimena.gpkg sinewave2.gpkg managedb
ogr2ogr -f PostgreSQL "PG:host=127.0.0.1 user=osm dbname=osm" sinewave2.gpkg ogr2ogr -f PostgreSQL "PG:host=127.0.0.1 user=osm dbname=osm" sinewave2.gpkg
touch $@ touch $@
REF = $(shell git describe --tags) REF = $(shell git describe --tags --dirty)
DIRTY = $(shell git status --porcelain | awk '{print"-dirty";exit}')
GIT_DIR = $(shell git rev-parse --show-toplevel)/.git GIT_DIR = $(shell git rev-parse --show-toplevel)/.git
version.tex: $(shell git ls-files .) $(GIT_DIR) version.tex: $(shell git ls-files .) $(GIT_DIR)
( \ ( \
date '+\gdef\GeneratedAt{%F %T %Z}%'; \ date '+\gdef\GeneratedAt{%F %T %Z}%'; \
printf '\gdef\VCDescribe{%s%s}%%\n' $(REF) $(DIRTY); \ printf '\gdef\VCDescribe{%s}%%\n' $(REF); \
) > $@ ) > $@