common.py \
docs \
doxygen \
- git_sha1_gen.sh \
+ bin/git_sha1_gen.sh \
scons \
SConstruct
--- /dev/null
+#!/bin/sh
+
+# run git from the sources directory
+cd "$(dirname "$0")"
+
+# don't print anything if git fails
+if ! git_sha1=$(git --git-dir=../.git rev-parse --short=10 HEAD 2>/dev/null)
+then
+ exit
+fi
+
+printf '#define MESA_GIT_SHA1 "git-%s"\n' "$git_sha1"
+++ /dev/null
-#!/bin/sh
-
-# run git from the sources directory
-cd "$(dirname "$0")"
-
-# don't print anything if git fails
-if ! git_sha1=$(git --git-dir=.git rev-parse --short=10 HEAD 2>/dev/null)
-then
- exit
-fi
-
-printf '#define MESA_GIT_SHA1 "git-%s"\n' "$git_sha1"
.PHONY: git_sha1.h.tmp
git_sha1.h.tmp:
- @sh $(top_srcdir)/git_sha1_gen.sh > $@
+ @sh $(top_srcdir)/bin/git_sha1_gen.sh > $@
git_sha1.h: git_sha1.h.tmp
@echo "updating git_sha1.h"
tempfile = "git_sha1.h.tmp"
with open(tempfile, "w") as f:
- args = [ 'sh', Dir('#').abspath + '/git_sha1_gen.sh' ]
+ args = [ 'sh', Dir('#').abspath + '/bin/git_sha1_gen.sh' ]
try:
subprocess.Popen(args, stdout=f).wait()
except:
$(intermediates)/git_sha1.h: $(wildcard $(MESA_TOP)/.git/logs/HEAD)
@mkdir -p $(dir $@)
@echo "GIT-SHA1: $(PRIVATE_MODULE) <= git"
- $(hide) sh $(MESA_TOP)/git_sha1_gen.sh > $@
+ $(hide) sh $(MESA_TOP)/bin/git_sha1_gen.sh > $@
LOCAL_EXPORT_C_INCLUDE_DIRS := $(intermediates)