bug#27781: LIBOBJS should depend on LIBOBJDIR

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#27781: LIBOBJS should depend on LIBOBJDIR

Michael Haubenwallner
Hi,

in flex-2.6.4, the $(LIBOBJDIR) does contain source files only,
eventually required via LDADD=$(LIBOBJ) in another directory.

Now with --disable-dependency-tracking, an out of source build fails
because $top_builddir/$(LIBOBJDIR) is not created by anyone, see
the discussion in https://github.com/westes/flex/issues/244 and
http://lists.gnu.org/archive/html/autoconf-patches/2017-07/msg00002.html

I have no idea for how to fix automake for this situation, but it
feels like automake should add this line to src/Makefile.in here:

$(LIBOBJS): $(LIBOBJDIR)$(am__dirstamp)

Thanks!
/haubi/



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#27781: LIBOBJS should depend on LIBOBJDIR

Mathieu Lirzin
Hello,

Michael Haubenwallner <[hidden email]> writes:

> Hi,
>
> in flex-2.6.4, the $(LIBOBJDIR) does contain source files only,
> eventually required via LDADD=$(LIBOBJ) in another directory.
>
> Now with --disable-dependency-tracking, an out of source build fails
> because $top_builddir/$(LIBOBJDIR) is not created by anyone, see
> the discussion in https://github.com/westes/flex/issues/244 and
> http://lists.gnu.org/archive/html/autoconf-patches/2017-07/msg00002.html
>
> I have no idea for how to fix automake for this situation, but it
> feels like automake should add this line to src/Makefile.in here:
>
> $(LIBOBJS): $(LIBOBJDIR)$(am__dirstamp)
>
> Thanks!
> /haubi/

I confirm that this is an Automake issue.  After some digging I think
'automake' should call the 'require_build_directory' subroutine for the
LIBOBJDIR variable.  However I don't have time to investigate more right
now.

Thanks for the report.

--
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#27781: LIBOBJS should depend on LIBOBJDIR

Michael Haubenwallner
Hi,

On 08/08/2017 11:17 PM, Mathieu Lirzin wrote:
> Michael Haubenwallner <[hidden email]> writes:
>>
>> I have no idea for how to fix automake for this situation, but it
>> feels like automake should add this line to src/Makefile.in here:
>>
>> $(LIBOBJS): $(LIBOBJDIR)$(am__dirstamp)

>
> I confirm that this is an Automake issue.  After some digging I think
> 'automake' should call the 'require_build_directory' subroutine for the
> LIBOBJDIR variable.  However I don't have time to investigate more right
> now.

In this case let me come up with attached patch for now
(without deeper knowledge of automake internals though).

Thanks!
/haubi/

0001-automake-Depend-on-LIBOBJDIR-for-LIBOBJS.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#27781: LIBOBJS should depend on LIBOBJDIR

Mathieu Lirzin
Hi,

Michael Haubenwallner <[hidden email]> writes:

> On 08/08/2017 11:17 PM, Mathieu Lirzin wrote:
>> Michael Haubenwallner <[hidden email]> writes:
>>>
>>> I have no idea for how to fix automake for this situation, but it
>>> feels like automake should add this line to src/Makefile.in here:
>>>
>>> $(LIBOBJS): $(LIBOBJDIR)$(am__dirstamp)
>
>>
>> I confirm that this is an Automake issue.  After some digging I think
>> 'automake' should call the 'require_build_directory' subroutine for the
>> LIBOBJDIR variable.  However I don't have time to investigate more right
>> now.
>
> In this case let me come up with attached patch for now
> (without deeper knowledge of automake internals though).
>
> Thanks!
> /haubi/
>
> From c3d51adb53400fc8bf65c0e003d810b2e7166d0d Mon Sep 17 00:00:00 2001
> From: Michael Haubenwallner <[hidden email]>
> Date: Wed, 16 Aug 2017 18:16:12 +0200
> Subject: [PATCH] automake: Depend on LIBOBJDIR for LIBOBJS.
>
> This change fixes automake bug#27781.
>
> * bin/automake.in: Add Makefile dependency on LIBOBJDIR/dirstamp for
> each LIBOBJS/ALLOCA variable used.
> ---

Excellent!

To ensure this bug is not reintroduced later, I think it is important to
combine this patch with a test.  Are you willing to look into adding
one?

Thank you

--
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#27781: LIBOBJS should depend on LIBOBJDIR

Michael Haubenwallner


On 08/17/2017 01:29 AM, Mathieu Lirzin wrote:
> Michael Haubenwallner <[hidden email]> writes:
>> On 08/08/2017 11:17 PM, Mathieu Lirzin wrote:
>>> Michael Haubenwallner <[hidden email]> writes:

>>
>> This change fixes automake bug#27781.
>>
>> * bin/automake.in: Add Makefile dependency on LIBOBJDIR/dirstamp for
>> each LIBOBJS/ALLOCA variable used.
>> ---
>
> Excellent!
>
> To ensure this bug is not reintroduced later, I think it is important to
> combine this patch with a test.  Are you willing to look into adding
> one?
Ok - like this one?

Thanks!
/haubi/

0001-automake-add-test-for-PR-27781.patch (2K) Download Attachment
Loading...