[Mesa-dev] [PATCH mesa] build systems: move git_sha1_gen.sh to bin/
Brian Paul
brianp at vmware.com
Thu Jul 6 21:15:01 UTC 2017
LGTM.
Reviewed-by: Brian Paul <brianp at vmware.com>
On 07/06/2017 02:08 PM, Eric Engestrom wrote:
> There was no reason for this script to live outside the scripts
> directory.
>
> Suggested-by: Brian Paul <brianp at vmware.com>
> Signed-off-by: Eric Engestrom <eric at engestrom.ch>
> ---
> Makefile.am | 2 +-
> git_sha1_gen.sh => bin/git_sha1_gen.sh | 2 +-
> src/Makefile.am | 2 +-
> src/SConscript | 2 +-
> src/mesa/Android.libmesa_git_sha1.mk | 2 +-
> 5 files changed, 5 insertions(+), 5 deletions(-)
> rename git_sha1_gen.sh => bin/git_sha1_gen.sh (69%)
>
> diff --git a/Makefile.am b/Makefile.am
> index d1eadee1e1..51542af3b8 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -53,7 +53,7 @@ EXTRA_DIST = \
> common.py \
> docs \
> doxygen \
> - git_sha1_gen.sh \
> + bin/git_sha1_gen.sh \
> scons \
> SConstruct
>
> diff --git a/git_sha1_gen.sh b/bin/git_sha1_gen.sh
> similarity index 69%
> rename from git_sha1_gen.sh
> rename to bin/git_sha1_gen.sh
> index 20ab8df8ea..898e590758 100755
> --- a/git_sha1_gen.sh
> +++ b/bin/git_sha1_gen.sh
> @@ -4,7 +4,7 @@
> 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)
> +if ! git_sha1=$(git --git-dir=../.git rev-parse --short=10 HEAD 2>/dev/null)
> then
> exit
> fi
> diff --git a/src/Makefile.am b/src/Makefile.am
> index 36995e08a4..5aee6b0141 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -21,7 +21,7 @@
>
> .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"
> diff --git a/src/SConscript b/src/SConscript
> index c31e4ec06f..37b3f8572e 100644
> --- a/src/SConscript
> +++ b/src/SConscript
> @@ -24,7 +24,7 @@ def write_git_sha1_h_file(filename):
>
> 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:
> diff --git a/src/mesa/Android.libmesa_git_sha1.mk b/src/mesa/Android.libmesa_git_sha1.mk
> index a5a1ebb37f..7d64b1c809 100644
> --- a/src/mesa/Android.libmesa_git_sha1.mk
> +++ b/src/mesa/Android.libmesa_git_sha1.mk
> @@ -46,7 +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"
> - $(hide) sh $(MESA_TOP)/git_sha1_gen.sh > $@
> + $(hide) sh $(MESA_TOP)/bin/git_sha1_gen.sh > $@
>
> LOCAL_EXPORT_C_INCLUDE_DIRS := $(intermediates)
>
>
More information about the mesa-dev
mailing list