diff --git a/II/Referatas/Makefile b/II/Referatas/Makefile index d5f2cb6..7cf9255 100644 --- a/II/Referatas/Makefile +++ b/II/Referatas/Makefile @@ -20,8 +20,9 @@ db/.faux_ready: zeimena.gpkg managedb touch $@ GIT_DIR = $(shell git rev-parse --show-toplevel)/.git - version.tex: $(shell git ls-files .) $(GIT_DIR) - date "+%F %T %Z" | awk '{print "\\gdef\\GeneratedAt{"$$0"}%"}' > $@ - [ -n "$$(git status --porcelain)" ] && suffix="-dirty"; \ - git describe --tags | awk '{print "\\gdef\\VCDescribe{"$$0"'$$suffix'}%"}' >> $@ + ( \ + date "+\\gdef\\GeneratedAt{%F %T %Z}%"; \ + [ -n "$$(git status --porcelain)" ] && suffix="-dirty"; \ + git describe --tags | awk '{print "\\gdef\\VCDescribe{"$$0"'$$suffix'}%"}'; \ + ) > $@