Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] igt/build: Do not fail git build when there is no git
@ 2014-07-21 12:28 Tvrtko Ursulin
  2014-07-22 13:53 ` Thomas Wood
  0 siblings, 1 reply; 3+ messages in thread
From: Tvrtko Ursulin @ 2014-07-21 12:28 UTC (permalink / raw)
  To: Intel-gfx

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-22 13:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-21 12:28 [PATCH] igt/build: Do not fail git build when there is no git Tvrtko Ursulin
2014-07-22 13:53 ` Thomas Wood
2014-07-22 13:53   ` [PATCH] build: improve version.h generation Thomas Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox