Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Intel-gfx@lists.freedesktop.org
Subject: [PATCH] igt/build: Do not fail git build when there is no git
Date: Mon, 21 Jul 2014 13:28:07 +0100	[thread overview]
Message-ID: <1405945687-23831-1-git-send-email-tvrtko.ursulin@linux.intel.com> (raw)

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 <tvrtko.ursulin@intel.com>
---
 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

             reply	other threads:[~2014-07-21 12:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-21 12:28 Tvrtko Ursulin [this message]
2014-07-22 13:53 ` [PATCH] igt/build: Do not fail git build when there is no git Thomas Wood
2014-07-22 13:53   ` [PATCH] build: improve version.h generation Thomas Wood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1405945687-23831-1-git-send-email-tvrtko.ursulin@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=Intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox