[Mesa-dev] [PATCH 3/3] genxml: avoid using GNU make extensions

Jason Ekstrand jason at jlekstrand.net
Mon May 2 05:32:18 UTC 2016


On May 1, 2016 1:56 AM, "Emil Velikov" <emil.l.velikov at gmail.com> wrote:
>
> On 1 May 2016 at 09:49, Jonathan Gray <jsg at jsg.id.au> wrote:
> > On Fri, Apr 22, 2016 at 05:57:40PM +0100, Emil Velikov wrote:
> >> On 22 April 2016 at 16:21, Jonathan Gray <jsg at jsg.id.au> wrote:
> >> > Avoid using % in target, a GNU make extension.  Allows this to build
on OpenBSD.
> >> >
> >> > Signed-off-by: Jonathan Gray <jsg at jsg.id.au>
> >> > ---
> >> >  src/intel/genxml/Makefile.am | 16 ++++++++++++++--
> >> >  1 file changed, 14 insertions(+), 2 deletions(-)
> >> >
> >> > diff --git a/src/intel/genxml/Makefile.am
b/src/intel/genxml/Makefile.am
> >> > index be3ad41..57618a0 100644
> >> > --- a/src/intel/genxml/Makefile.am
> >> > +++ b/src/intel/genxml/Makefile.am
> >> > @@ -28,7 +28,19 @@ BUILT_SOURCES =
       \
> >> >
> >> >  PYTHON3_GEN = $(AM_V_GEN)$(PYTHON3) $(PYTHON_FLAGS)
> >> >
> >> > -%_pack.h : %.xml gen_pack_header.py
> >> > -       $(PYTHON3_GEN) $(srcdir)/gen_pack_header.py $< > $@
> >> > +gen6_pack.h : gen6.xml gen_pack_header.py
> >> > +       $(PYTHON3_GEN) $(srcdir)/gen_pack_header.py gen6.xml > $@
> >> > +
> >> > +gen7_pack.h : gen7.xml gen_pack_header.py
> >> > +       $(PYTHON3_GEN) $(srcdir)/gen_pack_header.py gen7.xml > $@
> >> > +
> >> > +gen75_pack.h : gen75.xml gen_pack_header.py
> >> > +       $(PYTHON3_GEN) $(srcdir)/gen_pack_header.py gen75.xml > $@
> >> > +
> >> > +gen8_pack.h : gen8.xml gen_pack_header.py
> >> > +       $(PYTHON3_GEN) $(srcdir)/gen_pack_header.py gen8.xml > $@
> >> > +
> >> > +gen9_pack.h : gen9.xml gen_pack_header.py
> >> > +       $(PYTHON3_GEN) $(srcdir)/gen_pack_header.py gen9.xml > $@
> >> >
> >> One can use a similar approach as the one in
> >> src/mesa/drivers/dri/common/xmlpool/Makefile.am.
> >>
> >> Namely use SUFFIX(es).
> >>  - add a couple of variables at the top
> >>  - rename the generated headers to have distinct suffix (%.pack.h,
> >> %.gen.h or anything else along those lines)
> >>
> >> It's up-to others to decide which option to go for.
> >>
> >> Thanks
> >> Emil
> >
> > So which is it to be?  Should I send another patch for the other
approach?
>
> Jason, Chad do you have any preference on the topic ? Should one tweak
> the generic rule to work everywhere or just expand it.

genX.pack.h sounds good to me

> Thanks
> Emil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160501/7afb53f4/attachment.html>


More information about the mesa-dev mailing list