GNU bug report logs - #9587
Automake claims $(*F), $(<D), etc. are non-POSIX.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: automake; Severity: minor; Reported by: Nick Bowler <nbowler@HIDDEN>; dated Fri, 23 Sep 2011 19:03:02 UTC; Maintainer for automake is bug-automake@HIDDEN.

Message received at 9587 <at> debbugs.gnu.org:


Received: (at 9587) by debbugs.gnu.org; 19 Oct 2011 15:19:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 19 11:19:21 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RGXvM-00041N-MT
	for submit <at> debbugs.gnu.org; Wed, 19 Oct 2011 11:19:21 -0400
Received: from mail.elliptictech.com ([209.217.122.41]
	helo=mail.ellipticsemi.com) by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <nbowler@HIDDEN>) id 1RGXvK-000419-AW
	for 9587 <at> debbugs.gnu.org; Wed, 19 Oct 2011 11:19:19 -0400
Received: from nbowler by mail.ellipticsemi.com with local (Exim 4.76)
	(envelope-from <nbowler@HIDDEN>)
	id 1RGXu8-0006Gk-ES; Wed, 19 Oct 2011 11:18:04 -0400
Date: Wed, 19 Oct 2011 11:18:04 -0400
From: Nick Bowler <nbowler@HIDDEN>
To: Stefano Lattarini <stefano.lattarini@HIDDEN>
Subject: Re: bug#9587: Automake claims $(*F), $(<D), etc. are non-POSIX.
Message-ID: <20111019151804.GA7083@HIDDEN>
References: <20110923190208.GA30532@HIDDEN>
	<20110923194713.GA21467@HIDDEN>
	<201110191105.22845.stefano.lattarini@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <201110191105.22845.stefano.lattarini@HIDDEN>
Organization: Elliptic Technologies Inc.
User-Agent: Mutt/1.5.21 (2010-09-15)
X-Spam-Score: -3.6 (---)
X-Debbugs-Envelope-To: 9587
Cc: bug-automake@HIDDEN, 9587 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.5 (---)

On 2011-10-19 11:05 +0200, Stefano Lattarini wrote:
> On Friday 23 September 2011, Nick Bowler wrote:
> > Neither bmake nor pmake seem too support $(?F) or $(?D) (both expand
> > to be empty in both inference and target rules).  And dmake seems to
> > differ slightly from POSIX wrt the "D" variants.  Quoting IEEE Std
> > 1003.1-2004 again:
> >
> > > The directory part is the path prefix of the file without a
> > > trailing slash; for the current directory, the directory part is '.'.
> >
> > For all the "D" variants, dmake puts a trailing slash contrary to the
> > above, and for the current directory expands to the empty string instead
> > of "." as required.
>
> Given this, and the fact that no-one has complained about this automake
> limitation so far, I'm oriented at simply leave the situation as is.

The only reason I didn't notice this before is I've been unknowingly
running for years without portability warnings enabled.  I didn't
realize (until now) that they get disabled by "foreign" in:

  AM_INIT_AUTOMAKE([-Wall -Werror foreign ...]).

While it's certainly possible to avoid the use of these macros by doing
it in the shell, they're invaluable in non-recursive build systems:
probably about half of the suffix rules that I write contain either
$(@D) or $(*F) (automake only warns about the latter).  Amusingly, of
those two variables in the make implementations that I've tested, only
$(@D) has portability issues (dmake) -- and it's the one that automake
*doesn't* warn about.

The dmake issues noted above are pretty minor: I doubt a trailing slash
in a directory name would affect many rules, though an empty string
instead of "." might.  But since these macros are really only useful
for working with files *not* in the current working directory, this
also seems unlikely to affect many rules (but I guess deserves a note).

But yeah, $(?F) and $(?D) are obviously not portable.  This is
unfortunate, but I haven't actually used these particular macros
before.

Incidentally, automake also produces similar non-POSIX warnings about
$(<), $(*), $(%) and $(?), which are the same as $<, $*, $% and $?,
respectively.  It also warns about things like $(<:.foo=.bar).

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




Information forwarded to bug-automake@HIDDEN:
bug#9587; Package automake. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 19 Oct 2011 15:19:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 19 11:19:35 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RGXvb-00041l-5q
	for submit <at> debbugs.gnu.org; Wed, 19 Oct 2011 11:19:35 -0400
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <nbowler@HIDDEN>) id 1RGXvZ-00041a-82
	for submit <at> debbugs.gnu.org; Wed, 19 Oct 2011 11:19:33 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <nbowler@HIDDEN>) id 1RGXuO-00023D-OX
	for submit <at> debbugs.gnu.org; Wed, 19 Oct 2011 11:18:24 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
	autolearn=unavailable version=3.3.1
Received: from lists.gnu.org ([140.186.70.17]:56855)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <nbowler@HIDDEN>) id 1RGXuO-000239-Mz
	for submit <at> debbugs.gnu.org; Wed, 19 Oct 2011 11:18:20 -0400
Received: from eggs.gnu.org ([140.186.70.92]:53201)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <nbowler@HIDDEN>) id 1RGXuK-00049E-I1
	for bug-automake@HIDDEN; Wed, 19 Oct 2011 11:18:20 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <nbowler@HIDDEN>) id 1RGXuE-00022K-V9
	for bug-automake@HIDDEN; Wed, 19 Oct 2011 11:18:16 -0400
Received: from mail.elliptictech.com ([209.217.122.41]:56462
	helo=mail.ellipticsemi.com) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <nbowler@HIDDEN>) id 1RGXuE-000223-Ev
	for bug-automake@HIDDEN; Wed, 19 Oct 2011 11:18:10 -0400
Received: from nbowler by mail.ellipticsemi.com with local (Exim 4.76)
	(envelope-from <nbowler@HIDDEN>)
	id 1RGXu8-0006Gk-ES; Wed, 19 Oct 2011 11:18:04 -0400
Date: Wed, 19 Oct 2011 11:18:04 -0400
From: Nick Bowler <nbowler@HIDDEN>
To: Stefano Lattarini <stefano.lattarini@HIDDEN>
Subject: Re: bug#9587: Automake claims $(*F), $(<D), etc. are non-POSIX.
Message-ID: <20111019151804.GA7083@HIDDEN>
References: <20110923190208.GA30532@HIDDEN>
	<20110923194713.GA21467@HIDDEN>
	<201110191105.22845.stefano.lattarini@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <201110191105.22845.stefano.lattarini@HIDDEN>
Organization: Elliptic Technologies Inc.
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Spam-Score: -5.4 (-----)
X-Debbugs-Envelope-To: submit
Cc: bug-automake@HIDDEN, 9587 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -5.5 (-----)

On 2011-10-19 11:05 +0200, Stefano Lattarini wrote:
> On Friday 23 September 2011, Nick Bowler wrote:
> > Neither bmake nor pmake seem too support $(?F) or $(?D) (both expand
> > to be empty in both inference and target rules).  And dmake seems to
> > differ slightly from POSIX wrt the "D" variants.  Quoting IEEE Std
> > 1003.1-2004 again:
> >
> > > The directory part is the path prefix of the file without a
> > > trailing slash; for the current directory, the directory part is '.'.
> >
> > For all the "D" variants, dmake puts a trailing slash contrary to the
> > above, and for the current directory expands to the empty string instead
> > of "." as required.
>
> Given this, and the fact that no-one has complained about this automake
> limitation so far, I'm oriented at simply leave the situation as is.

The only reason I didn't notice this before is I've been unknowingly
running for years without portability warnings enabled.  I didn't
realize (until now) that they get disabled by "foreign" in:

  AM_INIT_AUTOMAKE([-Wall -Werror foreign ...]).

While it's certainly possible to avoid the use of these macros by doing
it in the shell, they're invaluable in non-recursive build systems:
probably about half of the suffix rules that I write contain either
$(@D) or $(*F) (automake only warns about the latter).  Amusingly, of
those two variables in the make implementations that I've tested, only
$(@D) has portability issues (dmake) -- and it's the one that automake
*doesn't* warn about.

The dmake issues noted above are pretty minor: I doubt a trailing slash
in a directory name would affect many rules, though an empty string
instead of "." might.  But since these macros are really only useful
for working with files *not* in the current working directory, this
also seems unlikely to affect many rules (but I guess deserves a note).

But yeah, $(?F) and $(?D) are obviously not portable.  This is
unfortunate, but I haven't actually used these particular macros
before.

Incidentally, automake also produces similar non-POSIX warnings about
$(<), $(*), $(%) and $(?), which are the same as $<, $*, $% and $?,
respectively.  It also warns about things like $(<:.foo=.bar).

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




Information forwarded to bug-automake@HIDDEN:
bug#9587; Package automake. Full text available.
Severity set to 'minor' from 'normal' Request was from Stefano Lattarini <stefano.lattarini@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 9587 <at> debbugs.gnu.org:


Received: (at 9587) by debbugs.gnu.org; 19 Oct 2011 09:06:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 19 05:06:48 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RGS6p-0001Vo-TY
	for submit <at> debbugs.gnu.org; Wed, 19 Oct 2011 05:06:48 -0400
Received: from mail-wy0-f172.google.com ([74.125.82.172])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <stefano.lattarini@HIDDEN>)
	id 1RGS6m-0001VW-Mp; Wed, 19 Oct 2011 05:06:46 -0400
Received: by wyh22 with SMTP id 22so1427784wyh.3
	for <multiple recipients>; Wed, 19 Oct 2011 02:05:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=from:to:subject:date:user-agent:cc:references:in-reply-to
	:mime-version:content-type:content-transfer-encoding:message-id;
	bh=lEI3fCipjjxCFyK4ZH9dWwiKHJn4x1t+yUyPCYyLdhI=;
	b=ca7DW83c33l0r08GYT4SuCzq1Z8Boa55zipkAURYZjMZGV2wIYHgMHF1QQxZWrDs8f
	HpMIpl3hObvp5ugT4Uhh4lo3ZJXfPlsBxhf8gZ/U8+F2Yk3BveOprawoyJmfCIJHSRBx
	idzCh81ainDxef8xpY3ltjmWOF1I7MwvwivEw=
Received: by 10.216.163.83 with SMTP id z61mr2145280wek.77.1319015137121;
	Wed, 19 Oct 2011 02:05:37 -0700 (PDT)
Received: from bigio.localnet
	(host144-99-dynamic.5-87-r.retail.telecomitalia.it. [87.5.99.144])
	by mx.google.com with ESMTPS id q30sm8556284wbn.17.2011.10.19.02.05.34
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 19 Oct 2011 02:05:35 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@HIDDEN>
To: bug-automake@HIDDEN
Subject: Re: bug#9587: Automake claims $(*F), $(<D), etc. are non-POSIX.
Date: Wed, 19 Oct 2011 11:05:22 +0200
User-Agent: KMail/1.13.7 (Linux/2.6.30-2-686; KDE/4.6.5; i686; ; )
References: <20110923190208.GA30532@HIDDEN>
	<20110923194713.GA21467@HIDDEN>
In-Reply-To: <20110923194713.GA21467@HIDDEN>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <201110191105.22845.stefano.lattarini@HIDDEN>
X-Spam-Score: -4.1 (----)
X-Debbugs-Envelope-To: 9587
Cc: Nick Bowler <nbowler@HIDDEN>, 9587 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.1 (----)

severity 9587 minor
thanks

Hi Nick, sorry for the delay.

On Friday 23 September 2011, Nick Bowler wrote:
> On 2011-09-23 15:02 -0400, Nick Bowler wrote:
> > These variables are supported by (at least) bmake, pmake, dmake and GNU
> > make.  I can reproduce this with the following example:
> 
> I spoke a bit too soon here.  Neither bmake nor pmake seem too support
> $(?F) or $(?D) (both expand to be empty in both inference and target
> rules).  And dmake seems to differ slightly from POSIX wrt the "D"
> variants.  Quoting IEEE Std 1003.1-2004 again:
> 
> > The directory part is the path prefix of the file without a
> > trailing slash; for the current directory, the directory part is '.'.
> 
> For all the "D" variants, dmake puts a trailing slash contrary to the
> above, and for the current directory expands to the empty string instead
> of "." as required.
>
Given this, and the fact that no-one has complained about this automake
limitation so far, I'm oriented at simply leave the situation as is.

Still, if someone else do care, and write a proper patch to improve the
situation, I'd be happy to consider it.  A "proper" patch should do the
following:

  - Add a test, say "spy-internal-macros.test", which ensures that all
    the POSIX internal macros Automake does not warn about are supported
    by the make implementation that is being used in the tests.

  - For POSIX-mandated internal macros that are not portable in practice,
    Automake should give an error stating "non-portable internal macros"
    (or something like that), rather than "non-POSIX variable name".

Regards,
   Stefano




Information forwarded to bug-automake@HIDDEN:
bug#9587; Package automake. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 19 Oct 2011 09:06:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 19 05:06:51 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RGS6t-0001W9-8j
	for submit <at> debbugs.gnu.org; Wed, 19 Oct 2011 05:06:51 -0400
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <stefano.lattarini@HIDDEN>) id 1RGS6r-0001Vc-7j
	for submit <at> debbugs.gnu.org; Wed, 19 Oct 2011 05:06:50 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@HIDDEN>) id 1RGS5k-0003Qi-SM
	for submit <at> debbugs.gnu.org; Wed, 19 Oct 2011 05:05:41 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	RCVD_IN_DNSWL_LOW, T_DKIM_INVALID,
	T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1
Received: from lists.gnu.org ([140.186.70.17]:54586)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@HIDDEN>) id 1RGS5k-0003Qe-Qc
	for submit <at> debbugs.gnu.org; Wed, 19 Oct 2011 05:05:40 -0400
Received: from eggs.gnu.org ([140.186.70.92]:39049)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@HIDDEN>) id 1RGS5j-00068g-IM
	for bug-automake@HIDDEN; Wed, 19 Oct 2011 05:05:40 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@HIDDEN>) id 1RGS5i-0003QE-Bq
	for bug-automake@HIDDEN; Wed, 19 Oct 2011 05:05:39 -0400
Received: from mail-wy0-f169.google.com ([74.125.82.169]:36936)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@HIDDEN>) id 1RGS5i-0003QA-1P
	for bug-automake@HIDDEN; Wed, 19 Oct 2011 05:05:38 -0400
Received: by wyg34 with SMTP id 34so1773140wyg.0
	for <bug-automake@HIDDEN>; Wed, 19 Oct 2011 02:05:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=from:to:subject:date:user-agent:cc:references:in-reply-to
	:mime-version:content-type:content-transfer-encoding:message-id;
	bh=lEI3fCipjjxCFyK4ZH9dWwiKHJn4x1t+yUyPCYyLdhI=;
	b=ca7DW83c33l0r08GYT4SuCzq1Z8Boa55zipkAURYZjMZGV2wIYHgMHF1QQxZWrDs8f
	HpMIpl3hObvp5ugT4Uhh4lo3ZJXfPlsBxhf8gZ/U8+F2Yk3BveOprawoyJmfCIJHSRBx
	idzCh81ainDxef8xpY3ltjmWOF1I7MwvwivEw=
Received: by 10.216.163.83 with SMTP id z61mr2145280wek.77.1319015137121;
	Wed, 19 Oct 2011 02:05:37 -0700 (PDT)
Received: from bigio.localnet
	(host144-99-dynamic.5-87-r.retail.telecomitalia.it. [87.5.99.144])
	by mx.google.com with ESMTPS id q30sm8556284wbn.17.2011.10.19.02.05.34
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 19 Oct 2011 02:05:35 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@HIDDEN>
To: bug-automake@HIDDEN
Subject: Re: bug#9587: Automake claims $(*F), $(<D), etc. are non-POSIX.
Date: Wed, 19 Oct 2011 11:05:22 +0200
User-Agent: KMail/1.13.7 (Linux/2.6.30-2-686; KDE/4.6.5; i686; ; )
References: <20110923190208.GA30532@HIDDEN>
	<20110923194713.GA21467@HIDDEN>
In-Reply-To: <20110923194713.GA21467@HIDDEN>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <201110191105.22845.stefano.lattarini@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Spam-Score: -5.2 (-----)
X-Debbugs-Envelope-To: submit
Cc: Nick Bowler <nbowler@HIDDEN>, 9587 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -5.2 (-----)

severity 9587 minor
thanks

Hi Nick, sorry for the delay.

On Friday 23 September 2011, Nick Bowler wrote:
> On 2011-09-23 15:02 -0400, Nick Bowler wrote:
> > These variables are supported by (at least) bmake, pmake, dmake and GNU
> > make.  I can reproduce this with the following example:
> 
> I spoke a bit too soon here.  Neither bmake nor pmake seem too support
> $(?F) or $(?D) (both expand to be empty in both inference and target
> rules).  And dmake seems to differ slightly from POSIX wrt the "D"
> variants.  Quoting IEEE Std 1003.1-2004 again:
> 
> > The directory part is the path prefix of the file without a
> > trailing slash; for the current directory, the directory part is '.'.
> 
> For all the "D" variants, dmake puts a trailing slash contrary to the
> above, and for the current directory expands to the empty string instead
> of "." as required.
>
Given this, and the fact that no-one has complained about this automake
limitation so far, I'm oriented at simply leave the situation as is.

Still, if someone else do care, and write a proper patch to improve the
situation, I'd be happy to consider it.  A "proper" patch should do the
following:

  - Add a test, say "spy-internal-macros.test", which ensures that all
    the POSIX internal macros Automake does not warn about are supported
    by the make implementation that is being used in the tests.

  - For POSIX-mandated internal macros that are not portable in practice,
    Automake should give an error stating "non-portable internal macros"
    (or something like that), rather than "non-POSIX variable name".

Regards,
   Stefano




Information forwarded to bug-automake@HIDDEN:
bug#9587; Package automake. Full text available.

Message received at 9587 <at> debbugs.gnu.org:


Received: (at 9587) by debbugs.gnu.org; 23 Sep 2011 19:47:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 23 15:47:45 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1R7Bir-000696-2r
	for submit <at> debbugs.gnu.org; Fri, 23 Sep 2011 15:47:45 -0400
Received: from dsl-67-204-24-19.acanac.net ([67.204.24.19]
	helo=mail.ellipticsemi.com) by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <nbowler@HIDDEN>) id 1R7Bio-00068r-47
	for 9587 <at> debbugs.gnu.org; Fri, 23 Sep 2011 15:47:43 -0400
Received: from nbowler by mail.ellipticsemi.com with local (Exim 4.76)
	(envelope-from <nbowler@HIDDEN>) id 1R7BiL-0005aZ-5H
	for 9587 <at> debbugs.gnu.org; Fri, 23 Sep 2011 15:47:13 -0400
Date: Fri, 23 Sep 2011 15:47:13 -0400
From: Nick Bowler <nbowler@HIDDEN>
To: 9587 <at> debbugs.gnu.org
Subject: Re: Automake claims $(*F), $(<D), etc. are non-POSIX.
Message-ID: <20110923194713.GA21467@HIDDEN>
References: <20110923190208.GA30532@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20110923190208.GA30532@HIDDEN>
Organization: Elliptic Technologies Inc.
User-Agent: Mutt/1.5.21 (2010-09-15)
X-Spam-Score: -2.5 (--)
X-Debbugs-Envelope-To: 9587
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.5 (--)

On 2011-09-23 15:02 -0400, Nick Bowler wrote:
> These variables are supported by (at least) bmake, pmake, dmake and GNU
> make.  I can reproduce this with the following example:

I spoke a bit too soon here.  Neither bmake nor pmake seem too support
$(?F) or $(?D) (both expand to be empty in both inference and target
rules).  And dmake seems to differ slightly from POSIX wrt the "D"
variants.  Quoting IEEE Std 1003.1-2004 again:

> The directory part is the path prefix of the file without a
> trailing slash; for the current directory, the directory part is '.'.

For all the "D" variants, dmake puts a trailing slash contrary to the
above, and for the current directory expands to the empty string instead
of "." as required.

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




Information forwarded to bug-automake@HIDDEN:
bug#9587; Package automake. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 23 Sep 2011 19:02:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 23 15:02:46 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1R7B1K-00054s-Cp
	for submit <at> debbugs.gnu.org; Fri, 23 Sep 2011 15:02:46 -0400
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <nbowler@HIDDEN>) id 1R7B1H-00054l-Ec
	for submit <at> debbugs.gnu.org; Fri, 23 Sep 2011 15:02:44 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <nbowler@HIDDEN>) id 1R7B0o-0002YP-Fx
	for submit <at> debbugs.gnu.org; Fri, 23 Sep 2011 15:02:15 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,
	URIBL_BLACK autolearn=no version=3.3.1
Received: from lists.gnu.org ([140.186.70.17]:46998)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <nbowler@HIDDEN>) id 1R7B0o-0002YL-EL
	for submit <at> debbugs.gnu.org; Fri, 23 Sep 2011 15:02:14 -0400
Received: from eggs.gnu.org ([140.186.70.92]:45473)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <nbowler@HIDDEN>) id 1R7B0n-0002Y9-4R
	for bug-automake@HIDDEN; Fri, 23 Sep 2011 15:02:14 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <nbowler@HIDDEN>) id 1R7B0l-0002Xi-FL
	for bug-automake@HIDDEN; Fri, 23 Sep 2011 15:02:12 -0400
Received: from mail.elliptictech.com ([209.217.122.41]:43185
	helo=mail.ellipticsemi.com) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <nbowler@HIDDEN>) id 1R7B0l-0002XN-AQ
	for bug-automake@HIDDEN; Fri, 23 Sep 2011 15:02:11 -0400
Received: from nbowler by mail.ellipticsemi.com with local (Exim 4.76)
	(envelope-from <nbowler@HIDDEN>) id 1R7B0i-0004XO-Pz
	for bug-automake@HIDDEN; Fri, 23 Sep 2011 15:02:08 -0400
Date: Fri, 23 Sep 2011 15:02:08 -0400
From: Nick Bowler <nbowler@HIDDEN>
To: bug-automake@HIDDEN
Subject: Automake claims $(*F), $(<D), etc. are non-POSIX.
Message-ID: <20110923190208.GA30532@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Organization: Elliptic Technologies Inc.
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Spam-Score: -4.6 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.6 (----)

Hello,

When running automake without "foreign" in configure.ac it claims that
variables such as $(*F), $(<D), etc. are non-POSIX, with an error of the
form:

  Makefile.am:2: *F: non-POSIX variable name

The complaints *do* occur with automake --foreign; you have to actually
put foreign in configure.ac (or in AUTOMAKE_OPTIONS) to make them go
away.  Regardless, automake does not complain about $(@F) or $(@D).
However, $(*F) and friends are most certainly POSIX variable names.
Quoting IEEE Std 1003.1-2004:

> The five internal macros are [... $@, $%, $?, $<, $* ...].
>
> Each of the internal macros has an alternative form.  When an
> uppercase 'D' or 'F' is appended to any of the macros, the meaning
> shall be changed to the directory part for 'D' and filename part for
> 'F'. The directory part is the path prefix of the file without a
> trailing slash; for the current directory, the directory part is '.'.
> When the $? macro contains more than one prerequisite filename, the
> $(?D) and $(?F) (or ${?D} and ${?F}) macros expand to a list of
> directory name parts and filename parts respectively.

These variables are supported by (at least) bmake, pmake, dmake and GNU
make.  I can reproduce this with the following example:

% cat >Makefile.am <<'EOF'
.foo.bar:
	echo "$(@F) $(%F) $(?F) $(<F) $(*F) $(@D) $(%D) $(?D) $(<D) $(*D)" > $@
EOF

% cat >configure.ac <<'EOF'
AC_INIT([test], [1.0])

AM_INIT_AUTOMAKE([-Wall])

AC_CONFIG_FILES([Makefile])
AC_OUTPUT
EOF

  % aclocal
  % automake --add-missing --foreign
  configure.ac:3: installing `./install-sh'
  configure.ac:3: installing `./missing'
  Makefile.am:2: %F: non-POSIX variable name
  Makefile.am:2: ?F: non-POSIX variable name
  Makefile.am:2: <F: non-POSIX variable name
  Makefile.am:2: *F: non-POSIX variable name
  Makefile.am:2: %D: non-POSIX variable name
  Makefile.am:2: ?D: non-POSIX variable name
  Makefile.am:2: <D: non-POSIX variable name
  Makefile.am:2: *D: non-POSIX variable name

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




Acknowledgement sent to Nick Bowler <nbowler@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-automake@HIDDEN. Full text available.
Report forwarded to bug-automake@HIDDEN:
bug#9587; Package automake. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

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