On 11 March 2017 at 19:22, Lionel Landwerlin
<lionel.g.landwer...@intel.com> wrote:
> This reduces the size of the aubinator binary from ~1.4Mb to ~700Kb.
> With can now drop the checks on xxd in configure.
>
> v2: Fix incorrect makefile dependency (Lionel)
>
> v3: use $(PYTHON2) (Emil)
>
> Signed-off-by: Lionel Landwerlin <lionel.g.landwer...@intel.com>
> ---
>  configure.ac                 |  1 -
>  src/intel/Makefile.genxml.am | 11 ++-----
>  src/intel/tools/Makefile.am  |  4 ++-
>  src/intel/tools/decoder.c    | 68 
> +++++++++++++++++++++++++++++++++++++++-----
>  4 files changed, 66 insertions(+), 18 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index d64ed2d3e8..11bd39bc15 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -126,7 +126,6 @@ LT_PREREQ([2.2])
>  LT_INIT([disable-static])
>
>  AC_CHECK_PROG(RM, rm, [rm -f])
> -AC_CHECK_PROG(XXD, xxd, [xxd])
>
>  AX_PROG_BISON([],
>                AS_IF([test ! -f 
> "$srcdir/src/compiler/glsl/glcpp/glcpp-parse.c"],
> diff --git a/src/intel/Makefile.genxml.am b/src/intel/Makefile.genxml.am
> index 1866d7e2df..7755d60ee0 100644
> --- a/src/intel/Makefile.genxml.am
> +++ b/src/intel/Makefile.genxml.am
> @@ -35,18 +35,11 @@ $(GENXML_GENERATED_FILES): genxml/gen_pack_header.py
>         $(MKDIR_GEN)
>         $(PYTHON_GEN) $(srcdir)/genxml/gen_pack_header.py $< > $@ || ($(RM) 
> $@; false)
>
> -# xxd generates variable names based on the path of the input file. We
> -# prefer to generate our own name here, so it doesn't vary from
> -# in/out-of-tree builds.
> -
> -$(GENXML_GENERATED_FILES): Makefile.am
> +$(GENXML_GENERATED_FILES): genxml/gen_zipped_file.py
>
>  .xml_xml.h:
>         $(MKDIR_GEN)
> -       $(AM_V_GEN) echo -n "static const uint8_t " > $@; \
> -       echo "$(@F)_xml[] = {" | sed -e 's,_xml.h,,' >> $@; \
> -       cat $< | $(XXD) -i >> $@; \
> -       echo "};" >> $@
> +       $(AM_V_GEN) $(PYTHON2) $(srcdir)/genxml/gen_zipped_file.py $< > $@

Since we use shell redirection to create the file we still need the "
|| ($(RM) $@; false)" piece. Feel free to squash just before pushing.

With the above the series is
Reviewed-by: Emil Velikov <emil.veli...@collabora.com>

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

Reply via email to