[Mesa-dev] [PATCH] mapi: fix out-of-tree build dependencies

Emil Velikov emil.l.velikov at gmail.com
Tue Oct 11 17:44:18 UTC 2016


On 11 October 2016 at 17:13, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
> On 11.10.2016 16:26, Emil Velikov wrote:
>>
>> On 11 October 2016 at 14:46, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
>>>
>>> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
>>>
>>> Pick up changes to API XML files also when Mesa is built outside the
>>> source
>>> tree.
>>> ---
>>>  src/mapi/Makefile.am | 4 ++--
>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/src/mapi/Makefile.am b/src/mapi/Makefile.am
>>> index d6bf5d8..46afe3b 100644
>>> --- a/src/mapi/Makefile.am
>>> +++ b/src/mapi/Makefile.am
>>> @@ -49,22 +49,22 @@ AM_CPPFLAGS =
>>> \
>>>         -I$(top_srcdir)/src/mapi                                \
>>>         -I$(top_builddir)/src/mapi
>>>
>>>  include Makefile.sources
>>>
>>>  MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D)
>>>  PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
>>>
>>>  glapi_gen_mapi_deps := \
>>>         mapi_abi.py \
>>> -       $(wildcard glapi/gen/*.xml) \
>>> -       $(wildcard glapi/gen/*.py)
>>> +       $(wildcard $(top_srcdir)/src/mapi/glapi/gen/*.xml) \
>>> +       $(wildcard $(top_srcdir)/src/mapi/glapi/gen/*.py)
>>>
>> Hmm are you sure about this ? AFAICT by default you get $srcdir which
>> combined with glapi/gen/foo should work just fine... or is it the
>> wildcard that's causing the mayhem ? Please add a word or two about it
>> in the commit message.
>
>
> Well, I'm really not an expert on make intricacies of this level, but `make
> -p` confirms that the wildcards didn't match anything previously
> (glapi_gen_mapi_deps is set to only mapi_abi.py and nothing else), and with
> the explicit $(top_srcdir) they match as they should. Perhaps this should be
> considered a bug in make, but it is what it is. I can add a comment about
> this to the commit.
>
It sounds like strange interaction with wildcard indeed. We shouldn't
be using it in the first place but that's not too easy to untangle no
unless you insist don't bother with it any more. Just speak a piece of
your/my comment in the commit log.

Big thanks for spotting/resolving this.
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>

Emil


More information about the mesa-dev mailing list