Re: [Mesa-dev] [PATCH] android: re-generate git_sha1.h if git HEAD updated

2016-02-26 Thread Emil Velikov
On 26 February 2016 at 07:09, Chih-Wei Huang  wrote:
> The git_sha1.h has to depend on the git HEAD
> otherwise it will never be updated.
>
> Signed-off-by: Chih-Wei Huang 
> ---
>  src/mesa/Android.gen.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/Android.gen.mk b/src/mesa/Android.gen.mk
> index a985f0a..e567102 100644
> --- a/src/mesa/Android.gen.mk
> +++ b/src/mesa/Android.gen.mk
> @@ -69,7 +69,7 @@ define es-gen
> $(hide) $(PRIVATE_SCRIPT) $(1) $(PRIVATE_XML) > $@
>  endef
>
> -$(intermediates)/main/git_sha1.h:
> +$(intermediates)/main/git_sha1.h: $(wildcard $(MESA_TOP)/.git/HEAD)

I'd suggest porting over the autotools approach (via a temporary file)
or even moving the hunk to Makefile.gen (or Makefile.common) and using
it in both builds.

Related: wondering about moving the includes/cflags - although with
the aosp build changes, things might be problematic. Do you foresee
(from Android POV) any issues with doing that ?

Thanks
Emil
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] android: re-generate git_sha1.h if git HEAD updated

2016-02-25 Thread Chih-Wei Huang
The git_sha1.h has to depend on the git HEAD
otherwise it will never be updated.

Signed-off-by: Chih-Wei Huang 
---
 src/mesa/Android.gen.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/Android.gen.mk b/src/mesa/Android.gen.mk
index a985f0a..e567102 100644
--- a/src/mesa/Android.gen.mk
+++ b/src/mesa/Android.gen.mk
@@ -69,7 +69,7 @@ define es-gen
$(hide) $(PRIVATE_SCRIPT) $(1) $(PRIVATE_XML) > $@
 endef
 
-$(intermediates)/main/git_sha1.h:
+$(intermediates)/main/git_sha1.h: $(wildcard $(MESA_TOP)/.git/HEAD)
@mkdir -p $(dir $@)
@echo "GIT-SHA1: $(PRIVATE_MODULE) <= git"
$(hide) touch $@
-- 
1.9.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev