motiejus/stud

study spacejunk
git clone https://git.jakstys.lt/motiejus/stud.git
Log | Tree | Refs | LICENSE

commit b279688c14e0b17a3e354b096f2feb9a4dec3540 (tree)
parent 7ea7632ae8bd19dc24870bcca6c77d760f7422fb
Author: Motiejus Jakštys <desired.mta@gmail.com>
Date:   Fri, 22 May 2020 22:20:47 +0300

even prettier

Diffstat:
MII/Referatas/Makefile | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

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