<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, May 2, 2016 at 2:27 AM, Jonathan Gray <span dir="ltr"><<a href="mailto:jsg@jsg.id.au" target="_blank">jsg@jsg.id.au</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">On Mon, May 02, 2016 at 02:23:46AM -0700, Jason Ekstrand wrote:<br>
> On May 1, 2016 11:24 PM, "Jonathan Gray" <<a href="mailto:jsg@jsg.id.au">jsg@jsg.id.au</a>> wrote:<br>
> ><br>
> > % pattern rules are a GNU extension. Convert the use of one to a<br>
> > suffix rule to allow this to build on OpenBSD.<br>
> ><br>
> > Signed-off-by: Jonathan Gray <<a href="mailto:jsg@jsg.id.au">jsg@jsg.id.au</a>><br>
> > ---<br>
> > src/intel/genxml/Makefile.am | 4 +++-<br>
> > 1 file changed, 3 insertions(+), 1 deletion(-)<br>
> ><br>
> > diff --git a/src/intel/genxml/Makefile.am b/src/intel/genxml/Makefile.am<br>
> > index f493d48..ea68fb9 100644<br>
> > --- a/src/intel/genxml/Makefile.am<br>
> > +++ b/src/intel/genxml/Makefile.am<br>
> > @@ -28,7 +28,9 @@ BUILT_SOURCES =<br>
> \<br>
> ><br>
> > PYTHON3_GEN = $(AM_V_GEN)$(PYTHON3) $(PYTHON_FLAGS)<br>
> ><br>
> > -%_pack.h : %.xml gen_pack_header.py<br>
> > +SUFFIXES = _pack.h .xml<br>
> > +<br>
> > +.xml_pack.h : gen_pack_header.py<br>
> > $(PYTHON3_GEN) $(srcdir)/gen_pack_header.py $< > $@<br>
><br>
> We'd better also fix up all the places we include these files. :-)<br>
<br>
</span>The generated filenames don't change, there is no need to:<br></blockquote><br></div><div class="gmail_quote">I just read up on Suffix rules (didn't even know they existed). I think what you're doing there *mostly* works. The problem is that, according to the GNU make docs (<a href="https://www.gnu.org/software/make/manual/html_node/Suffix-Rules.html">https://www.gnu.org/software/make/manual/html_node/Suffix-Rules.html</a>), suffix rules aren't allowed to have any additional prerequisites declared. If they do, they get treated as normal non-suffix rules. How do we do this as a suffix rule *and* have it depend on both genN.xml and gen_pack_header.py?<br></div><div class="gmail_quote">--jason<br></div></div></div>