GNU bug report logs - #27781
LIBOBJS should depend on LIBOBJDIR

Previous Next

Package: automake;

Reported by: Michael Haubenwallner <michael.haubenwallner <at> ssi-schaefer.com>

Date: Fri, 21 Jul 2017 09:09:01 UTC

Severity: normal

Tags: confirmed, fixed, patch

Done: Mathieu Lirzin <mthl <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Haubenwallner <michael.haubenwallner <at> ssi-schaefer.com>
To: Mathieu Lirzin <mthl <at> gnu.org>, Nick Bowler <nbowler <at> draconx.ca>
Cc: 27781 <at> debbugs.gnu.org
Subject: bug#27781: LIBOBJS should depend on LIBOBJDIR
Date: Thu, 24 Aug 2017 16:23:00 +0200
[Message part 1 (text/plain, inline)]

On 08/24/2017 11:35 AM, Mathieu Lirzin wrote:
> Nick Bowler <nbowler <at> draconx.ca> writes:
>> On 8/23/17, Mathieu Lirzin <mthl <at> gnu.org> wrote:
>>> Michael Haubenwallner <michael.haubenwallner <at> ssi-schaefer.com> writes:
>>>> Another thought about the final "$(LIBOBJS): .../.dirstamp" Makefile
>>>> line: If I remember correctly, there have been (non-GNU) make
>>>> implementations thatchoke on this rule when LIBOBJS is an empty
>>>> variable: Am I wrong here, or is GNU make required anyway these days?
>>>
>>> GNU make is not required for current Automake version.  I didn't find
>>> any reference of this issue with empty variable target in Autoconf
>>> "Portable Make programming" section [1] but if it is actually the case
>>> then it would be nice to find a solution for that.
>>
>> POSIX requires that target rules specify at least one target.  At least
>> dmake will fail to parse the makefile if it contains an target rule with
>> no targets:
>>
>>   % cat >Makefile <<'EOF'
>> FOO =
>> dummy: ;
>> $(FOO): ;
>> EOF
>>   % dmake
>>   dmake:  Makefile:  line 3:  Error: -- Missing targets or attributes in rule
>>
>> If the target list is a macro which can reasonably be empty then one
>> solution is to add a bogus target name that won't be used anywhere
>> else, along the lines of:
>>
>>   gobbledegook $(FOO): ;
> 
> Instead of this dummy target, I would rather prefer adding the dirstamp
> dependency for each explicit object file separately.  this should be computed
> from the '%libsources' variable.  However after a quick look in the code, it
> seems that this variable is not properly populated by the
> 'scan_autoconf_traces' subroutine.  It only contains the files that are
> explicitely defined by scanning the AC_LIBSOURCE macro and not by AC_LIBOBJ or
> AC_LIBSOURCES in 'configure.ac'.
> 
> Michael: Are you interested in looking into this?
> 

Here's an attempt to use the explicit AC_LIBSOURCE values to depend on the
LIBOBJDIR dirstamp. IMHO, tracing AC_LIBOBJ would not provide additional
information over AC_LIBSOURCE, as AC_LIBOBJ by itself uses AC_LIBSOURCE.

But then there is _AC_LIBOBJS_NORMALIZE, adding $U to {,LT}LIBOBJS values
(seems referring to "Automake's ANSI2KNR"): What is this about?

/haubi/
[0001-automake-Depend-on-LIBOBJDIR-for-LIBOBJS.patch (text/x-patch, attachment)]

This bug report was last modified 7 years and 310 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.