aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomi Ollila <tomi.ollila@iki.fi>2016-05-26 00:04:32 +0300
committerDavid Bremner <david@tethera.net>2016-09-04 08:14:55 -0300
commite0e6a17675a4f4f56f2c6891aaf7eb50f404ffd2 (patch)
tree94ae0dc4525dcecd4ec5a3b24f98565acc6e19a2
parent17341ec798b4cb2fe192824bcf8b7e78236e4121 (diff)
Makefile.local: use $(wildcard) to check existence of ${srcdir}/.git
With this GNU Make construct one shell invocation can be skipped and code looks shorter (narrower). This would now match to .git being other file type than regular file or directory (or symlink to those), but that is not a use case anyone should expect users to do.
-rw-r--r--Makefile.local2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile.local b/Makefile.local
index 20041947..5587cd2c 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -10,7 +10,7 @@
# repository), we let git append identification of the actual commit.
PACKAGE=notmuch
-IS_GIT:=$(shell if [ -d ${srcdir}/.git -o -f ${srcdir}/.git ] ; then echo yes ; else echo no; fi)
+IS_GIT:=$(if $(wildcard ${srcdir}/.git),yes,no)
ifeq ($(IS_GIT),yes)
DATE:=$(shell git --git-dir=${srcdir}/.git log --date=short -1 --pretty=format:%cd)