GNU bug report logs - #32269
AM_INIT_AUTOMAKE, subdir-objects, and $(DEPDIR) not being set correctly

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; Reported by: Philip Prindeville <philipp@HIDDEN>; dated Wed, 25 Jul 2018 12:10:01 UTC; Maintainer for automake is bug-automake@HIDDEN.

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


Received: (at 32269) by debbugs.gnu.org; 25 Jul 2018 23:00:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 25 19:00:37 2018
Received: from localhost ([127.0.0.1]:57826 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fiSlo-0004rx-JS
	for submit <at> debbugs.gnu.org; Wed, 25 Jul 2018 19:00:36 -0400
Received: from mail.redfish-solutions.com ([66.232.79.143]:54068)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philipp@HIDDEN>) id 1fiSlm-0004re-3G
 for 32269 <at> debbugs.gnu.org; Wed, 25 Jul 2018 19:00:34 -0400
Received: from macmini.redfish-solutions.com (macmini.redfish-solutions.com
 [192.168.1.38]) (authenticated bits=0)
 by mail.redfish-solutions.com (8.15.2/8.15.2) with ESMTPSA id w6PN0Sci031358
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO);
 Wed, 25 Jul 2018 17:00:28 -0600
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
Subject: Re: bug#32269: Expanding variables
From: Philip Prindeville <philipp@HIDDEN>
In-Reply-To: <623a15dc-bfa8-fdbc-1221-66222c801b21@HIDDEN>
Date: Wed, 25 Jul 2018 17:00:25 -0600
Content-Transfer-Encoding: quoted-printable
Message-Id: <785998B5-8E3A-4544-969D-1D361DB9202E@HIDDEN>
References: <3E4A6442-0D20-4940-A249-B525B9B092F0@HIDDEN>
 <1707A070-4272-497D-BBB9-22A89BCDBBB6@HIDDEN>
 <CADyTPEzqz1jTNv0ZR5YVqc0dbP7dJYU9zUc-7aHELvVO-JMGHg@HIDDEN>
 <1A79BEB8-2A0F-42F1-8435-AD5A67A636F1@HIDDEN>
 <623a15dc-bfa8-fdbc-1221-66222c801b21@HIDDEN>
To: Eric Blake <eblake@HIDDEN>
X-Mailer: Apple Mail (2.3445.9.1)
X-Scanned-By: MIMEDefang 2.84 on 192.168.1.3
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 32269
Cc: Nick Bowler <nbowler@HIDDEN>, 32269 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



> On Jul 25, 2018, at 4:15 PM, Eric Blake <eblake@HIDDEN> wrote:
>=20
> On 07/25/2018 05:06 PM, Philip Prindeville wrote:
>=20
>> Well, the above assumes Gnu Make, yes.
>> How many other flavors of Make does automake/autoconf work with?
>=20
> At the moment, all of them.
>=20
> Automake 2.0 (currently a work in progress if you check out the right =
branches in git) requires GNU make, for more compact makefiles at the =
expense of ditching portability to other arcane makes, now that GNU make =
is more likely to be easily obtained on modern systems.  But automake =
1.x still tries as hard as possible to produce Makefiles portable to all =
common make implementations, as long as your Makefile.am doesn't add =
non-portable code to be passed through to Makefile.
>=20


In the absence of Gnu make, the other choice would be to emit:

cat <<_EOF_ > /tmp/extvar$$.mk
include $(pwd)/Makefile

xyzzy:
	@echo =E2=80=98\$(variable)=E2=80=99
_EOF_

then we could run =E2=80=9Cvariable=3D$(make -f /tmp/extvar$$.mk =
xyzzy)=E2=80=9D from inside configure=E2=80=A6 a little uglier than =
using val.% as a target, but=E2=80=A6





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

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


Received: (at 32269) by debbugs.gnu.org; 25 Jul 2018 22:15:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 25 18:15:33 2018
Received: from localhost ([127.0.0.1]:57798 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fiS4C-0003h3-SX
	for submit <at> debbugs.gnu.org; Wed, 25 Jul 2018 18:15:33 -0400
Received: from mx3-rdu2.redhat.com ([66.187.233.73]:33502 helo=mx1.redhat.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eblake@HIDDEN>) id 1fiS48-0003gk-GP
 for 32269 <at> debbugs.gnu.org; Wed, 25 Jul 2018 18:15:28 -0400
Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com
 [10.11.54.6])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mx1.redhat.com (Postfix) with ESMTPS id EA5DE805A530;
 Wed, 25 Jul 2018 22:15:22 +0000 (UTC)
Received: from [10.10.123.162] (ovpn-123-162.rdu2.redhat.com [10.10.123.162])
 by smtp.corp.redhat.com (Postfix) with ESMTP id 82F1621565E1;
 Wed, 25 Jul 2018 22:15:22 +0000 (UTC)
Subject: Re: bug#32269: Expanding variables
To: Philip Prindeville <philipp@HIDDEN>,
 Nick Bowler <nbowler@HIDDEN>
References: <3E4A6442-0D20-4940-A249-B525B9B092F0@HIDDEN>
 <1707A070-4272-497D-BBB9-22A89BCDBBB6@HIDDEN>
 <CADyTPEzqz1jTNv0ZR5YVqc0dbP7dJYU9zUc-7aHELvVO-JMGHg@HIDDEN>
 <1A79BEB8-2A0F-42F1-8435-AD5A67A636F1@HIDDEN>
From: Eric Blake <eblake@HIDDEN>
Organization: Red Hat, Inc.
Message-ID: <623a15dc-bfa8-fdbc-1221-66222c801b21@HIDDEN>
Date: Wed, 25 Jul 2018 17:15:22 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.8.0
MIME-Version: 1.0
In-Reply-To: <1A79BEB8-2A0F-42F1-8435-AD5A67A636F1@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
 (mx1.redhat.com [10.11.55.8]); Wed, 25 Jul 2018 22:15:22 +0000 (UTC)
X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]);
 Wed, 25 Jul 2018 22:15:22 +0000 (UTC) for IP:'10.11.54.6'
 DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com'
 HELO:'smtp.corp.redhat.com' FROM:'eblake@HIDDEN' RCPT:''
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 32269
Cc: 32269 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On 07/25/2018 05:06 PM, Philip Prindeville wrote:

> Well, the above assumes Gnu Make, yes.
> 
> How many other flavors of Make does automake/autoconf work with?

At the moment, all of them.

Automake 2.0 (currently a work in progress if you check out the right 
branches in git) requires GNU make, for more compact makefiles at the 
expense of ditching portability to other arcane makes, now that GNU make 
is more likely to be easily obtained on modern systems.  But automake 
1.x still tries as hard as possible to produce Makefiles portable to all 
common make implementations, as long as your Makefile.am doesn't add 
non-portable code to be passed through to Makefile.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org




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

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


Received: (at 32269) by debbugs.gnu.org; 25 Jul 2018 22:06:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 25 18:06:57 2018
Received: from localhost ([127.0.0.1]:57792 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fiRvs-0003To-Sn
	for submit <at> debbugs.gnu.org; Wed, 25 Jul 2018 18:06:57 -0400
Received: from mail.redfish-solutions.com ([66.232.79.143]:53554)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philipp@HIDDEN>) id 1fiRvq-0003Ta-UA
 for 32269 <at> debbugs.gnu.org; Wed, 25 Jul 2018 18:06:55 -0400
Received: from macmini.redfish-solutions.com (macmini.redfish-solutions.com
 [192.168.1.38]) (authenticated bits=0)
 by mail.redfish-solutions.com (8.15.2/8.15.2) with ESMTPSA id w6PM6miI031123
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO);
 Wed, 25 Jul 2018 16:06:48 -0600
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
Subject: Re: bug#32269: Expanding variables
From: Philip Prindeville <philipp@HIDDEN>
In-Reply-To: <CADyTPEzqz1jTNv0ZR5YVqc0dbP7dJYU9zUc-7aHELvVO-JMGHg@HIDDEN>
Date: Wed, 25 Jul 2018 16:06:46 -0600
Content-Transfer-Encoding: 7bit
Message-Id: <1A79BEB8-2A0F-42F1-8435-AD5A67A636F1@HIDDEN>
References: <3E4A6442-0D20-4940-A249-B525B9B092F0@HIDDEN>
 <1707A070-4272-497D-BBB9-22A89BCDBBB6@HIDDEN>
 <CADyTPEzqz1jTNv0ZR5YVqc0dbP7dJYU9zUc-7aHELvVO-JMGHg@HIDDEN>
To: Nick Bowler <nbowler@HIDDEN>
X-Mailer: Apple Mail (2.3445.9.1)
X-Scanned-By: MIMEDefang 2.84 on 192.168.1.3
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 32269
Cc: 32269 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



> On Jul 25, 2018, at 2:37 PM, Nick Bowler <nbowler@HIDDEN> wrote:
> 
> On 7/25/18, Philip Prindeville <philipp@HIDDEN> wrote:
>> Since automake/autoconf are responsible for generating Makefiles, we
>> could add something like:
>> 
>> val.%:
>> 	@$(if $(filter undefined,$(origin $*)),\
>> 		echo "$* undefined" >&2, \
>> 		echo '$(subst ','"'"',$($*))' \
>> 	)
>> 
>> var.%:
>> 	@$(if $(filter undefined,$(origin $*)),\
>> 		echo "$* undefined" >&2, \
>> 		echo "$*='"'$(subst ','"'\"'\"'"',$($*))'"'" \
>> 	)
>> 
>> toward the bottom.
> 
> I'm not exactly sure what the purpose of this is, but it doesn't
> look like portable code, so probably not something Automake should
> be generating.
> 
> But don't let that stop you.  You can add basically anything you'd
> like, including the above rules, to your project's Makefile.am and
> Automake will copy it through to the output.
> 
> Cheers,
>  Nick


Well, the above assumes Gnu Make, yes.

How many other flavors of Make does automake/autoconf work with?

-Philip





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

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


Received: (at 32269) by debbugs.gnu.org; 25 Jul 2018 20:37:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 25 16:37:33 2018
Received: from localhost ([127.0.0.1]:57717 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fiQXN-0001NO-Ga
	for submit <at> debbugs.gnu.org; Wed, 25 Jul 2018 16:37:33 -0400
Received: from mail-lf1-f43.google.com ([209.85.167.43]:38166)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <nbowler@HIDDEN>) id 1fiQXJ-0001N6-2p
 for 32269 <at> debbugs.gnu.org; Wed, 25 Jul 2018 16:37:29 -0400
Received: by mail-lf1-f43.google.com with SMTP id a4-v6so6329448lff.5
 for <32269 <at> debbugs.gnu.org>; Wed, 25 Jul 2018 13:37:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=draconx-ca.20150623.gappssmtp.com; s=20150623;
 h=mime-version:in-reply-to:references:from:date:message-id:subject:to
 :cc; bh=5Ywa88rCTbUjlWyCNqcp6IC/LFuNyZ9fd9LI5vldQx0=;
 b=euwtelsezSRRdlklLq6NPhGIybTv/pKal/wfyCP+uFFISSZWB+oECT/L6JO/cglxUS
 DcugEKWRagqpOBPGZVTKMx6pAqfvo0F010WDxCfyNvhXOt2dgnIFKKwUCZ3EwgpesrTf
 MbxORek/e9OQVRCCooNFiFEO3eltb36M0dycfZ5LZV3fr9nZfS3vAaiS7CecvQHkIsPE
 9SSKfuVY/yt8vnWDch6j9kyuGmCAm/0FbcmmSs6d+j/86FBGfuXHJYsQlbrBoaXGt0cv
 jXlvNDloEBc0mi1DHglXWYMry1oAIVeXAqY33i8F50asJ6yVKOIARoKl0z9Twyrj7dOJ
 YvTw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:in-reply-to:references:from:date
 :message-id:subject:to:cc;
 bh=5Ywa88rCTbUjlWyCNqcp6IC/LFuNyZ9fd9LI5vldQx0=;
 b=NJP8lsIVz7w4xgqJvP+b7bWUvwWafeb0S5kRQ6DUie0yDgwyLxaq1mMPAWXozeLqD5
 K140XMj0ZKPZlHCuil71+vxTIZaqLb78uqaxlyYf4bFfi0hBAxlZQIfEsStLbjCvLGh7
 ALepQYQuBI9A2Ng7UqlR8+yJbFjbC3Lk8Gkqkj48TLcJTQnE0F/4lZuL1xvzqfdB4Zm+
 E8KWsobo4TaZMtfqSDaP9eIAKR4UC/6wKCTUO8uLfIYy2Hf1EsyvLissRpkv5Fhz5OOh
 UTgCFLDoTF85VUEE7BuQ+KI8URk9wQ6qX9hCzyOky7G8WEOATTKoDJclyXEfQA3OeYra
 C1mQ==
X-Gm-Message-State: AOUpUlFHRQqC7HX9BiG2UnP5guiv3Ub5qnLxs2hk3oBYapbrHE8XOUtz
 vC12rh9PUZRtuoy0kmh7EPxqPaNGnpyQcQ/PdIhe/g==
X-Google-Smtp-Source: AAOMgpdQHNuP4UDWm1j9TUSOFLEIJQ9g9Eo2Ymo5xIQ1zjs2Hdn+sz4VLRDvjq4IbFDa4ZVYTXFz9Sh3iiPsuR0WzjY=
X-Received: by 2002:a19:9345:: with SMTP id
 v66-v6mr14300065lfd.89.1532551043053; 
 Wed, 25 Jul 2018 13:37:23 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a2e:8893:0:0:0:0:0 with HTTP; Wed, 25 Jul 2018 13:37:22
 -0700 (PDT)
X-Originating-IP: [162.243.96.244]
In-Reply-To: <1707A070-4272-497D-BBB9-22A89BCDBBB6@HIDDEN>
References: <3E4A6442-0D20-4940-A249-B525B9B092F0@HIDDEN>
 <1707A070-4272-497D-BBB9-22A89BCDBBB6@HIDDEN>
From: Nick Bowler <nbowler@HIDDEN>
Date: Wed, 25 Jul 2018 16:37:22 -0400
Message-ID: <CADyTPEzqz1jTNv0ZR5YVqc0dbP7dJYU9zUc-7aHELvVO-JMGHg@HIDDEN>
Subject: Re: bug#32269: Expanding variables
To: Philip Prindeville <philipp@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 32269
Cc: 32269 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 7/25/18, Philip Prindeville <philipp@HIDDEN> wrote:
> Since automake/autoconf are responsible for generating Makefiles, we
> could add something like:
>
> val.%:
> 	@$(if $(filter undefined,$(origin $*)),\
> 		echo "$* undefined" >&2, \
> 		echo '$(subst ','"'"',$($*))' \
> 	)
>
> var.%:
> 	@$(if $(filter undefined,$(origin $*)),\
> 		echo "$* undefined" >&2, \
> 		echo "$*='"'$(subst ','"'\"'\"'"',$($*))'"'" \
> 	)
>
> toward the bottom.

I'm not exactly sure what the purpose of this is, but it doesn't
look like portable code, so probably not something Automake should
be generating.

But don't let that stop you.  You can add basically anything you'd
like, including the above rules, to your project's Makefile.am and
Automake will copy it through to the output.

Cheers,
  Nick




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

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


Received: (at 32269) by debbugs.gnu.org; 25 Jul 2018 19:12:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 25 15:12:33 2018
Received: from localhost ([127.0.0.1]:57611 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fiPD7-0007ii-Fs
	for submit <at> debbugs.gnu.org; Wed, 25 Jul 2018 15:12:33 -0400
Received: from mail.redfish-solutions.com ([66.232.79.143]:51920)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philipp@HIDDEN>) id 1fiPD5-0007iW-IS
 for 32269 <at> debbugs.gnu.org; Wed, 25 Jul 2018 15:12:31 -0400
Received: from macmini.redfish-solutions.com (macmini.redfish-solutions.com
 [192.168.1.38]) (authenticated bits=0)
 by mail.redfish-solutions.com (8.15.2/8.15.2) with ESMTPSA id w6PJCPeh030463
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO)
 for <32269 <at> debbugs.gnu.org>; Wed, 25 Jul 2018 13:12:25 -0600
From: Philip Prindeville <philipp@HIDDEN>
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
Subject: Expanding variables
Message-Id: <1707A070-4272-497D-BBB9-22A89BCDBBB6@HIDDEN>
Date: Wed, 25 Jul 2018 13:12:23 -0600
To: 32269 <at> debbugs.gnu.org
X-Mailer: Apple Mail (2.3445.9.1)
X-Scanned-By: MIMEDefang 2.84 on 192.168.1.3
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 32269
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Since automake/autoconf are responsible for generating Makefiles, we =
could add something like:

val.%:
	@$(if $(filter undefined,$(origin $*)),\
		echo "$* undefined" >&2, \
		echo '$(subst ','"'"',$($*))' \
	)

var.%:
	@$(if $(filter undefined,$(origin $*)),\
		echo "$* undefined" >&2, \
		echo "$*=3D'"'$(subst ','"'\"'\"'"',$($*))'"'" \
	)

toward the bottom.  Then if we found a line matching /\$(\([^)]+\))/ =
then we could look up =E2=80=9Cval.\1=E2=80=9D from the match, and =
substitute that back in.  Obviously the more matches, the more =
iterations and the more =E2=80=9Cmake -s val.\1=E2=80=9D lookups.  But =
at least it would work.

If we used a Perl helper, we could find ALL of the matches, and do ALL =
of the lookups at once in make for more constant time, since we=E2=80=99d =
do one make process per line regardless of how many substitutions were =
required.





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

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


Received: (at submit) by debbugs.gnu.org; 25 Jul 2018 12:09:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 25 08:09:56 2018
Received: from localhost ([127.0.0.1]:56342 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fiIc7-0002eu-E9
	for submit <at> debbugs.gnu.org; Wed, 25 Jul 2018 08:09:56 -0400
Received: from eggs.gnu.org ([208.118.235.92]:55977)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philipp@HIDDEN>) id 1fiCrc-0000EW-CP
 for submit <at> debbugs.gnu.org; Wed, 25 Jul 2018 02:01:33 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <philipp@HIDDEN>) id 1fiCrU-0001KA-2C
 for submit <at> debbugs.gnu.org; Wed, 25 Jul 2018 02:01:27 -0400
Received: from lists.gnu.org ([2001:4830:134:3::11]:57568)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <philipp@HIDDEN>)
 id 1fiCrT-0001Ju-Uq
 for submit <at> debbugs.gnu.org; Wed, 25 Jul 2018 02:01:23 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:46938)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <philipp@HIDDEN>) id 1fiCrQ-0002Kd-KQ
 for bug-automake@HIDDEN; Wed, 25 Jul 2018 02:01:23 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <philipp@HIDDEN>) id 1fiCrN-0001CK-Nv
 for bug-automake@HIDDEN; Wed, 25 Jul 2018 02:01:20 -0400
Received: from mail.redfish-solutions.com ([66.232.79.143]:38878)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <philipp@HIDDEN>)
 id 1fiCrN-000152-Fl
 for bug-automake@HIDDEN; Wed, 25 Jul 2018 02:01:17 -0400
Received: from macmini.redfish-solutions.com (macmini.redfish-solutions.com
 [192.168.1.38]) (authenticated bits=0)
 by mail.redfish-solutions.com (8.15.2/8.15.2) with ESMTPSA id w6P619ck026929
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO)
 for <bug-automake@HIDDEN>; Wed, 25 Jul 2018 00:01:09 -0600
From: Philip Prindeville <philipp@HIDDEN>
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
Subject: AM_INIT_AUTOMAKE, subdir-objects, and $(DEPDIR) not being set
 correctly
Message-Id: <3E4A6442-0D20-4940-A249-B525B9B092F0@HIDDEN>
Date: Wed, 25 Jul 2018 00:01:07 -0600
To: bug-automake@HIDDEN
X-Mailer: Apple Mail (2.3445.9.1)
X-Scanned-By: MIMEDefang 2.84 on 192.168.1.3
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.1 (----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Wed, 25 Jul 2018 08:09:54 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.1 (-----)

I=E2=80=99m using automake 1.15.1 on Fedora 28.

I changed my AM_INIT_AUTOMAKE() to include subdir-objects.

As soon as I did this, I started seeing failures like:

make[2]: Entering directory '/home/philipp/git/snt/libntp'
Makefile:902: warning: overriding recipe for target =
'../lib/isc/pthreads/.dirstamp'
Makefile:802: warning: ignoring old recipe for target =
'../lib/isc/pthreads/.dirstamp'
Makefile:905: warning: overriding recipe for target =
'../lib/isc/pthreads/.deps/.dirstamp'
Makefile:805: warning: ignoring old recipe for target =
'../lib/isc/pthreads/.deps/.dirstamp'
Makefile:964: ../lib/isc/unix/.deps/time.Po: No such file or directory
make[2]: *** No rule to make target '../lib/isc/unix/.deps/time.Po'.  =
Stop.
make[2]: Leaving directory '/home/philipp/git/snt/libntp'

After some head-scratching, I noticed:

$ find . -name '$*' -print
./sntp/tests/$(top_builddir)
./tests/ntpd/$(srcdir)
./libntp/$(srcdir)
$=20

and root-caused this to here:

    # Extract the definition of DEPDIR, am__include, and am__quote
    # from the Makefile without running 'make'.
    DEPDIR=3D`sed -n 's/^DEPDIR =3D //p' < "$mf"`
    test -z "$DEPDIR" && continue
    am__include=3D`sed -n 's/^am__include =3D //p' < "$mf"`
    test -z "$am__include" && continue
    am__quote=3D`sed -n 's/^am__quote =3D //p' < "$mf"`
    # Find all dependency output files, they are included files with
    # $(DEPDIR) in their names.  We invoke sed twice because it is the
    # simplest approach to changing $(DEPDIR) to its actual value in the
    # expansion.
    for file in `sed -n "
      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' =
<"$mf" | \
         sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
      # Make sure the directory exists.
      test -f "$dirpart/$file" && continue
      fdir=3D`$as_dirname -- "$file" ||
=E2=80=A6
      as_dir=3D$dirpart/$fdir; as_fn_mkdir_p
      # echo "creating $dirpart/$file"
      echo '# dummy' > "$dirpart/$file"
    done

Problem is, what happens if the line you=E2=80=99ve read looks like:

include $(srcdir)/../lib/isc/unix/$(DEPDIR)/time.Po

after mangling that, we end up with =
file=3D$(srcdir)/../lib/isc/unix/.deps/time.Po which is obviously wrong.

Yes, $(DEPDIR) needs to be substituted out=E2=80=A6 but so does every =
other variable potentially, including $(srcdir) =E2=80=A6

Either subdir-objects should handle ALL possible expansions (might =
require some hackery and recursively calling Makefile on each line to do =
expansions)=E2=80=A6 or configure should make sure that $file doesn=E2=80=99=
t match /\$(.*)/ indicating that it contains unexpanded variables=E2=80=A6=
 and maybe suggest using @variable@ substitutions instead if possible.

If you want to reproduce this yourselves, grab the ntp-4.8.2p11 tarball =
and change configure.ac and sntp/configure.ac to use =
AM_INIT_AUTOMAKE([=E2=80=A6 subdir-objects =E2=80=A6]) instead.

Run:

./bootstrap
./configure --with-crypto --with-threads --disable-silent-rules =
--disable-local-libevent

and you=E2=80=99ll see the broken behavior.

Thanks,

-Philip





Acknowledgement sent to Philip Prindeville <philipp@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-automake@HIDDEN. Full text available.
Report forwarded to bug-automake@HIDDEN:
bug#32269; 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: Mon, 25 Nov 2019 12:00:02 UTC

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