From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tvrtko Ursulin Subject: [PATCH] igt/build: Do not fail git build when there is no git Date: Mon, 21 Jul 2014 13:28:07 +0100 Message-ID: <1405945687-23831-1-git-send-email-tvrtko.ursulin@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTP id C59566E222 for ; Mon, 21 Jul 2014 05:28:31 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org Git detection probably belongs to configure.ac with the version.h rule reworked accordingly. Feel free to drop this if someone wants to spend time on a better fix. Signed-off-by: Tvrtko Ursulin --- Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 9949679..7b04d6f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -41,9 +41,11 @@ MAINTAINERCLEANFILES = ChangeLog INSTALL version.h.tmp: @touch $@ @if test -d .git; then \ - if which git > /dev/null; then git log -n 1 --oneline | \ + if which git > /dev/null 2>&1; then git log -n 1 --oneline | \ sed 's/^\([^ ]*\) .*/#define IGT_GIT_SHA1 "g\1"/' \ >> $@ ; \ + else \ + echo '#define IGT_GIT_SHA1 "NO-GIT"' >> $@ ; \ fi \ else \ echo '#define IGT_GIT_SHA1 "NOT-GIT"' >> $@ ; \ -- 1.9.1