[Mesa-dev] [PATCH v2] intel: genxml: fix out of tree builds

Jonathan Gray jsg at jsg.id.au
Sat Apr 1 01:13:20 UTC 2017


On Fri, Mar 31, 2017 at 04:53:21PM +0100, Emil Velikov wrote:
> On 31 March 2017 at 16:33, Lionel Landwerlin
> <lionel.g.landwerlin at intel.com> wrote:
> > On 31/03/17 16:21, Emil Velikov wrote:
> >>
> >> On 31 March 2017 at 14:40, Lionel Landwerlin
> >> <lionel.g.landwerlin at intel.com> wrote:
> >>>
> >>> v2: use Emil's recommendation
> >>>      change rule to closer to genxml/genX_bits.h
> >>>
> >>> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
> >>> ---
> >>>   src/intel/Makefile.genxml.am | 4 ++--
> >>>   1 file changed, 2 insertions(+), 2 deletions(-)
> >>>
> >>> diff --git a/src/intel/Makefile.genxml.am b/src/intel/Makefile.genxml.am
> >>> index 05a12f8f77..e34536d37c 100644
> >>> --- a/src/intel/Makefile.genxml.am
> >>> +++ b/src/intel/Makefile.genxml.am
> >>> @@ -34,9 +34,9 @@ $(GENXML_GENERATED_PACK_FILES):
> >>> genxml/gen_pack_header.py
> >>>          $(MKDIR_GEN)
> >>>          $(PYTHON_GEN) $(srcdir)/genxml/gen_pack_header.py $< > $@ ||
> >>> ($(RM) $@; false)
> >>>
> >>> -genxml/genX_xml.h: $(GENXML_XML_FILES) genxml/gen_zipped_file.py
> >>> +genxml/genX_xml.h: genxml/gen_zipped_file.py $(GENXML_XML_FILES)
> >>>          $(MKDIR_GEN)
> >>> -       $(AM_V_GEN) $(PYTHON2) $(srcdir)/genxml/gen_zipped_file.py
> >>> $(GENXML_XML_FILES) > $@ || ($(RM) $@; false)
> >>> +       $(PYTHON_GEN) $< $(GENXML_XML_FILES:%=$(srcdir)/%) > $@ || ($(RM)
> >>> $@; false)
> >>>
> >> This is not what I recommended :-( If my suggestion is unclear or
> >> buggy please say so.
> >>
> >> -Emil
> >>
> > Replacing "$(srcdir)/genxml/gen_zipped_file.py" by "$<" isn't right?
> > I think that's the only difference from what was in your email.
> 
> Barring the genX_bits.h case, we expand the script name throughout mesa.
> This way you don't really care the way the dependencies are listed,
> whether a new one gets added, etc.
> 
> -Emil

genX_bits.h should not be used as an example.

It uses $< in a non-suffix rule, a GNU extension.
It uses addprefix a GNU builtin.


More information about the mesa-dev mailing list