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: Nick Bowler <nbowler <at> draconx.ca>
To: Mathieu Lirzin <mthl <at> gnu.org>
Cc: 27781 <at> debbugs.gnu.org, Michael Haubenwallner <michael.haubenwallner <at> ssi-schaefer.com>
Subject: bug#27781: LIBOBJS should depend on LIBOBJDIR
Date: Wed, 23 Aug 2017 18:05:02 -0400
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): ;

Cheers,
  Nick




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.