GNU bug report logs - #13928
foo_SOURCES containing unexpanded $(var) breaks with 'subdir-object' option active

Previous Next

Package: automake;

Reported by: Bert Wesarg <bert.wesarg <at> googlemail.com>

Date: Mon, 11 Mar 2013 21:04:02 UTC

Severity: important

Tags: patch

Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 13928 <at> debbugs.gnu.org (full text, mbox):

From: Nick Bowler <nbowler <at> elliptictech.com>
To: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Cc: 13928 <at> debbugs.gnu.org, peda <at> lysator.liu.se, bfriesen <at> simple.dallas.tx.us,
	Bert Wesarg <bert.wesarg <at> googlemail.com>, eblake <at> redhat.com, miles <at> gnu.org
Subject: Re: bug#13928: VPATH issues with subdir-objects
Date: Tue, 12 Mar 2013 10:09:29 -0400
On 2013-03-11 23:27 +0100, Stefano Lattarini wrote:
> On 03/11/2013 10:33 PM, Nick Bowler wrote:
> > On 2013-03-11 21:55 +0100, Stefano Lattarini wrote:
> > [...]
> >>   - from Automake 2.0 onward, only enable the automatic dependency
> >>     tracking if GNU make is used; we can thus assume the presence
> >>     of the "-include" directive
> >>
> Actually, to be more precise, we could simply test at runtime if that
> directive is supported by the target make implementation (there is
> already code that does so for the "include" directive, so we shouldn't
> need any real new code or logic); or at least, if some equivalent
> directive is available.  If yes, we can enable automatic dependency
> tracking (without having to worry about the GNU vs. non-GNU make issue
> at all).  But sadly, it appears that in practice GNU make is the only
> make flavor to actually implement this kind feature so far :-/ so all
> of this is moot.

FWIW, I believe that NetBSD make supports -include as well.

[...]
> > Particularly if those users are running on an exotic platform
> > without GNU make
> >
> <complain-mode>
>   Which makes me ask again, as I've done many times already: does such
>   platforms truly exist, and if yes, are they really relevant and
>   worth bending over backwards for?
> </complain-mode>

A platform on which GNU make does not run at all?  Probably not, as
GNU make itself is very portable.  But platforms which do not have it
installed by default are easy to find: FreeBSD, for example.

More importantly, the problems caused by incomplete make dependencies
may not be obvious as an error when building the package: it's entirely
possible that the package will build successfully, but incompletely,
after modifying the sources, only causing incorrect behaviour later
when the program is run.

[...]
> > Ideally, we should try to fix the bug before ripping out an
> > otherwise-working feature.
>
> If someone volunteers to write a patch for such a fix, I certainly won't
> object to it.  But I'm not going to do it myself anytime soon (and likely,
> not even anytime later).

Regarding the actual bug: without knowing much (yet!) about the relevant
Automake internals, I'm a bit surprised that

  src = src
  foo_SOURCES = $(src)/foo.c

fails with subdir-objects, but on the other hand

  src = src/foo.c
  foo_SOURCES = $(src)

seems to work just fine...

Cheers,
-- 
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)




This bug report was last modified 10 years and 139 days ago.

Previous Next


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