From 8bbb4fa9c5ab4eb4d82c07fb3eec986b7a08662c Mon Sep 17 00:00:00 2001 From: Andreas Seltenreich Date: Thu, 3 May 2018 15:04:25 +0200 Subject: [PATCH] Makefile: Improve gitrev.h generation. --- Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 2a2eb3b..81b15ac 100644 --- a/Makefile.am +++ b/Makefile.am @@ -31,7 +31,9 @@ EXTRA_DIST = gitrev.h dump.hh expr.hh grammar.hh log.hh prod.hh \ dut.hh postgres.hh monetdb.hh log-v1.0-to-v1.2.sql gitrev.h: $(HEADERS) $(SOURCES) - echo "#define GITREV \"$$(git describe --dirty --tags --always)\"" > $@ + -if git describe --dirty --tags --always > /dev/null ; then \ + echo "#define GITREV \"$$(git describe --dirty --tags --always)\"" > $@ ;\ + fi filterdump: psql -c 'copy (select error from known) to stdout' smith|sort -u > known.txt