From 4f110c09a5f84803a49a5f879a69bea0648bc0be Mon Sep 17 00:00:00 2001 From: Dan H Date: Mon, 23 Apr 2018 15:38:23 -0400 Subject: [PATCH] Add printing of whether there are unstaged changes in the git hash print. --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index d507bf08..7d336c01 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,7 +8,7 @@ bin_SCRIPTS=grid-config BUILT_SOURCES = version.h version.h: - echo "`git log -n 1 --format=format:"#define GITHASH \\"%H:%d\\"%n" HEAD`" > $(srcdir)/lib/version.h + if [ `git status --porcelain | wc -l` -gt 0 ]; then a="unstaged stanges"; else a="no unstaged changes"; fi; echo "`git log -n 1 --format=format:"#define GITHASH \\"%H:%d $$a\\"%n" HEAD`" > $(srcdir)/lib/version.h .PHONY: bench check tests doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL)