build systems: uniformize git_sha1.h generation
[mesa.git] / src / mesa / Android.libmesa_git_sha1.mk
index 0fd176bf7d5d272917a1d30dbdfa404960fe88c8..a5a1ebb37f5150cbffa71dd89b9c36f1fe2f3dab 100644 (file)
@@ -46,12 +46,7 @@ LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/, git_sha1.h)
 $(intermediates)/git_sha1.h: $(wildcard $(MESA_TOP)/.git/logs/HEAD)
        @mkdir -p $(dir $@)
        @echo "GIT-SHA1: $(PRIVATE_MODULE) <= git"
 $(intermediates)/git_sha1.h: $(wildcard $(MESA_TOP)/.git/logs/HEAD)
        @mkdir -p $(dir $@)
        @echo "GIT-SHA1: $(PRIVATE_MODULE) <= git"
-       $(hide) touch $@
-       $(hide) if which git > /dev/null; then \
-                       git --git-dir $(MESA_TOP)/.git log -n 1 --oneline | \
-                       sed 's/^\([^ ]*\) .*/#define MESA_GIT_SHA1 "git-\1"/' \
-                       > $@; \
-               fi
+       $(hide) sh $(MESA_TOP)/git_sha1_gen.sh > $@
 
 LOCAL_EXPORT_C_INCLUDE_DIRS := $(intermediates)
 
 
 LOCAL_EXPORT_C_INCLUDE_DIRS := $(intermediates)