diff options
-rwxr-xr-x | bin/git_sha1_gen.py | 6 | ||||
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/git_sha1.h.in | 1 | ||||
-rw-r--r-- | src/mesa/Android.libmesa_git_sha1.mk | 2 |
4 files changed, 3 insertions, 8 deletions
diff --git a/bin/git_sha1_gen.py b/bin/git_sha1_gen.py index 77c5fa9d295..c6240662df3 100755 --- a/bin/git_sha1_gen.py +++ b/bin/git_sha1_gen.py @@ -47,10 +47,6 @@ args = parser.parse_args() git_sha1 = os.environ.get('MESA_GIT_SHA1_OVERRIDE', get_git_sha1())[:10] if git_sha1: - git_sha1_h_in_path = os.path.join(os.path.dirname(sys.argv[0]), - '..', 'src', 'git_sha1.h.in') - with open(git_sha1_h_in_path, 'r') as git_sha1_h_in: - new_sha1 = git_sha1_h_in.read().replace('@VCS_TAG@', git_sha1) - write_if_different(new_sha1) + write_if_different('#define MESA_GIT_SHA1 "git-' + git_sha1 + '"') else: write_if_different('') diff --git a/src/Makefile.am b/src/Makefile.am index 9de0192b791..396865cbe55 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -20,7 +20,7 @@ # IN THE SOFTWARE. .PHONY: git_sha1.h -git_sha1.h: $(top_srcdir)/src/git_sha1.h.in +git_sha1.h: @echo "updating $@" @$(PYTHON2) $(top_srcdir)/bin/git_sha1_gen.py --output $@ diff --git a/src/git_sha1.h.in b/src/git_sha1.h.in deleted file mode 100644 index dc17f5e6614..00000000000 --- a/src/git_sha1.h.in +++ /dev/null @@ -1 +0,0 @@ -#define MESA_GIT_SHA1 "git-@VCS_TAG@" diff --git a/src/mesa/Android.libmesa_git_sha1.mk b/src/mesa/Android.libmesa_git_sha1.mk index d27923074dd..fbbbf2fe094 100644 --- a/src/mesa/Android.libmesa_git_sha1.mk +++ b/src/mesa/Android.libmesa_git_sha1.mk @@ -43,7 +43,7 @@ $(intermediates)/dummy.c: LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/, git_sha1.h) -$(intermediates)/git_sha1.h: $(MESA_TOP)/src/git_sha1.h.in $(wildcard $(MESA_TOP)/.git/logs/HEAD) +$(intermediates)/git_sha1.h: $(wildcard $(MESA_TOP)/.git/logs/HEAD) @mkdir -p $(dir $@) @echo "GIT-SHA1: $(PRIVATE_MODULE) <= git" $(hide) $(MESA_PYTHON2) $(MESA_TOP)/bin/git_sha1_gen.py --output $@ |