GNU bug report logs - #74387
Cannot use ifdef and other Make conditionals

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: Maxim Cournoyer <maxim.cournoyer@HIDDEN>; dated Sun, 17 Nov 2024 04:09:02 UTC; Maintainer for automake is bug-automake@HIDDEN.

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


Received: (at 74387) by debbugs.gnu.org; 24 Nov 2024 13:42:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 24 08:42:10 2024
Received: from localhost ([127.0.0.1]:33254 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tFCsM-0004fV-DG
	for submit <at> debbugs.gnu.org; Sun, 24 Nov 2024 08:42:10 -0500
Received: from mail-qv1-f43.google.com ([209.85.219.43]:48430)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maxim.cournoyer@HIDDEN>) id 1tFCsK-0004fA-IZ
 for 74387 <at> debbugs.gnu.org; Sun, 24 Nov 2024 08:42:09 -0500
Received: by mail-qv1-f43.google.com with SMTP id
 6a1803df08f44-6d419832bf5so31936876d6.1
 for <74387 <at> debbugs.gnu.org>; Sun, 24 Nov 2024 05:42:08 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1732455662; x=1733060462; darn=debbugs.gnu.org;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=x4Xuxhkyy8nfmFvTRXMPe8PKLdhST9zYPsZxjt/P6NI=;
 b=VpAtnzX2WGyWy86yIjlFwtt4+aMLwqgnZq5O2wvUcHlKd3h3ABAYKPrBQyN8IAZPOr
 BXUCO97e7yFHxLzGrS6Yy+o/cizLg44+KyAN/SV4k1AZuJY8+rPYWVRFuuMXCqc+Hv04
 PSlEuTADUXzzrwmE31AwFmh0r6pMlhIa+O++vdoZQL8+7xXPXWZ6zFoC7bALkgHS7Sbp
 pBg3Dj+whlzqZbxhRQnbiI0K+ZlD7zJ0OzIfrNHSjxD0YYqTd2P0fB19go8sJMUNaPby
 SxnhjDh1DKawzOJFdqFj4sDQgAnANlGVBsr4G2TN+1zfbu/QLPH+UOLjy/MPrxfzAh1L
 fQ8g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1732455662; x=1733060462;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=x4Xuxhkyy8nfmFvTRXMPe8PKLdhST9zYPsZxjt/P6NI=;
 b=TvAYkWvNHzAKKHKR5Hxjxlinh//4oWAGdyCbVcSua5Hi6yC3u/tSe+4Ef/6/O3EWXU
 ptFI1iYkFIYdmElxabrDPPNQPQonIn7XuI9rL6R1wDRCrFORZ2MJA7lu7vtJaFlrKwQS
 m77P02WklQXLqEGDXrP8eEgw/sX8PBjHhSnjOtElcHKsV9kZ8AAva7zgBoWirxPUjtrq
 lZl6r3j3sFk/ng+sHRvTZc5Eb1ZFVUOThTHI9L+CgBq36BzrcQHyoRequJGl9jUz3fkX
 WXccLamitKAfjEg1sja3l+rMcRcjtEF4lyVipeNcV4ty35enKKL1afI9DipS/7IzWpUy
 JdMQ==
X-Gm-Message-State: AOJu0Yy4dmisqIjO1knVvvxwXzlNAH7Cqj38CIPNbGlkfvH/a7C8Vg0I
 TEId9qowYaLkzpuFWTT+bqNUZkLwEReuhxbjP+eG4q0DlokR0vCfkZvn8bIX
X-Gm-Gg: ASbGncuiQ+q1whCrFTjLuZCgLCflyTB6WnBdci0SlrEAIzQot/LiQEIGVnBJmbggDsQ
 XSq6DGwBf4oo1zVqzCnnGtxRxw82VHKm3OfksEEa7zDqgJ2fR9shbn62UuYo06+5nDE/zTQSdfV
 lIRD75S8psm22JiuydEa8XQUiQlB/bjZJAhSSM8oWyjUUa+mcd5xiBiZjdMzj2IfQrRwbMt3MOU
 VpDqPlBQptHkY2Za1LHbLskv5rwlFOrauyRaDyqaerclwk4j23luGqFGNKq3le8a/TjHB0=
X-Google-Smtp-Source: AGHT+IFnbMZkIoaEfGP9ktcGBdnhpD1Gd0upLP2tis19YCW7MkFotQ4YDE+8czme/PHMvM9yRhU1Hg==
X-Received: by 2002:a05:6214:d64:b0:6d1:9f29:2e3b with SMTP id
 6a1803df08f44-6d45100e963mr139663366d6.13.1732455662105; 
 Sun, 24 Nov 2024 05:41:02 -0800 (PST)
Received: from terra (vps-6234970c.vps.ovh.ca. [51.222.13.224])
 by smtp.gmail.com with ESMTPSA id
 6a1803df08f44-6d451b244fdsm31593816d6.77.2024.11.24.05.40.59
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 24 Nov 2024 05:41:01 -0800 (PST)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: "Zack Weinberg" <zack@HIDDEN>
Subject: Re: bug#74387: Cannot use Make conditionals
In-Reply-To: <f73e7520-9c13-4502-8bc5-09a3b5b3e739@HIDDEN> (Zack
 Weinberg's message of "Tue, 19 Nov 2024 18:45:51 -0500")
References: <87ed3azenb.fsf@HIDDEN>
 <202411192128.4AJLSZJg2353369@HIDDEN>
 <f73e7520-9c13-4502-8bc5-09a3b5b3e739@HIDDEN>
Date: Sun, 24 Nov 2024 22:40:52 +0900
Message-ID: <878qt8px5n.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74387
Cc: 74387 <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 (-)

Hi Zack,

"Zack Weinberg" <zack@HIDDEN> writes:

> Automake conditionals were originally created because make
> conditionals aren't portable. In principle, if you are willing to
> require GNU make (or any other specific Make that has conditionals)
> you shouldn't *need* Automake conditionals.
>
> Of course, things may not be that simple anymore. Can you please give some examples of the things you are trying to do, that seem to require use of both kinds of conditionals?

I was trying to come up with an environment variable to control whether
expensive tests of the test suite should be run or not,
e.g. depending on WITH_SLOW_TESTS=1 or WITH_SLOW_TESTS=0.

I didn't want to use an Autoclave conditional, as these are baked in the
build system following 'configure', i.e., not dynamic enough (I want the
ability to switch this on or off anytime I run the tests -- not just at
configure time).

This is where I thought of employing Make's native conditionals, which
would have enabled checking the value of the WITH_SLOW_TESTS environment
variable every time Make is run.

In the end, I've worked around the issue by moving the skip check/logic
in each test that I wanted to skip.  That's a bit ugly as when running
the test individually you need to remember to set WITH_SLOW_TESTS=1 to
really have it run, but it's the best I've found thus far.

For the full context of what I was working on, see the patches submit
for consideration to GNU Guix [0].

[0]  https://issues.guix.gnu.org/74394

I guess this can be closed, though I'd still be interested if there are
better ways to accomplish skipping some tests than what I've ended up
using, as that seems like some shortcoming that build system tinkerers
having gotten used to the likes of Meson, where you can script pretty
much anything, would not easily accept.

-- 
Thanks,
Maxim




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

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


Received: (at 74387) by debbugs.gnu.org; 19 Nov 2024 23:46:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 19 18:46:19 2024
Received: from localhost ([127.0.0.1]:44491 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tDXvH-0000FI-A2
	for submit <at> debbugs.gnu.org; Tue, 19 Nov 2024 18:46:19 -0500
Received: from fhigh-a2-smtp.messagingengine.com ([103.168.172.153]:37619)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zack@HIDDEN>) id 1tDXvE-0000F3-Dp
 for 74387 <at> debbugs.gnu.org; Tue, 19 Nov 2024 18:46:17 -0500
Received: from phl-compute-04.internal (phl-compute-04.phl.internal
 [10.202.2.44])
 by mailfhigh.phl.internal (Postfix) with ESMTP id 07D9311400FC;
 Tue, 19 Nov 2024 18:46:10 -0500 (EST)
Received: from phl-imap-05 ([10.202.2.95])
 by phl-compute-04.internal (MEProxy); Tue, 19 Nov 2024 18:46:10 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=owlfolio.org; h=
 cc:cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm2; t=1732059970;
 x=1732146370; bh=EvFxz9KoUp2C25fXImB7lG5HZS6phVUOr1BGI+k3DDU=; b=
 JU7CK1R1XeHxG6TBEYid942gmcAiv2/qI9w5OIXL/SL6MSMUqcUqc1f+N/QUmpJo
 RkwgwL7pIypBeYSkRW33fFWMBLt8ou3fGA3FCsXq3ytJ2mONX1lkI8GaAv9mk6DE
 F47r4QSTtiFvXG2eH7S3WtnTEXwyziP05Osif7WMiC/vKZf1pVeIaswgUsUIGKTD
 XxhCeGFS6/pRUw+GDP1uitqffbmj/FuXQRHfrqLYKP84pHcEWEZ/dqgsriOqkSBE
 kNH4UMerq7cf5PBgdx67bIVVt8TVZ7YK6XYdT67kfG0Vrh3Pu09f07wTRNVlN5PN
 5exWzAelhxdw4kBe576vqw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1732059970; x=
 1732146370; bh=EvFxz9KoUp2C25fXImB7lG5HZS6phVUOr1BGI+k3DDU=; b=j
 QNVujfOPRqSrYWceOa58jfbqjY7C3CQf5D1ME+CYeuf2Ba+aLk6km/6J9HhF8SYL
 h/E/72AbZGJfxVr0tW8qIaR871gDN3LanbYY7OsXvCsT/SjDDKLQ4YteA7KlLVk2
 3uq8VWCwKulwdV14wKMnRWgtFDWnbKGcAbcco2kCjtFs9pWKXG0vE//deqHhsVrG
 AvZoji6ik7xVLylOiNVUvMknvQS3n1bodiNtf4zfAWVIPNGhcoP6elxL8XWhRT31
 MzIUmb/HbyL818GTkLwrZFZkSdnTdA/YoGeQ9jmtdofc56d7MZ9b8HJPmVULw9jn
 91ONiLclWGWpfmoioQXkQ==
X-ME-Sender: <xms:QSM9Z_-GC2DvdB1EoH7eT6AVDufCJQQct5kVccot6D8Z1CZCxIXHkw>
 <xme:QSM9Z7uwOx0l9UKK7FKO2L1ERzNGwdVG3QACQs8I475wWpTRHhAw3KNsdPxKfUGn9
 z2JEX59XD-lpvoqsT0>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrfeefgddufecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr
 tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepofggfffhvf
 evkfgjfhfutgfgsehtjeertdertddtnecuhfhrohhmpedfkggrtghkucghvghinhgsvghr
 ghdfuceoiigrtghksehofihlfhholhhiohdrohhrgheqnecuggftrfgrthhtvghrnhepgf
 ejtdefleehtddvteeitdeigffgfedvheelieevkeetgfdtkeehhfegfffffedvnecuvehl
 uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepiigrtghksehofi
 hlfhholhhiohdrohhrghdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhht
 pdhrtghpthhtohepjeegfeekjeesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtth
 hopehmrgigihhmrdgtohhurhhnohihvghrsehgmhgrihhlrdgtohhm
X-ME-Proxy: <xmx:QSM9Z9CZ9iCuD1tZ2gUrYqkEKzIbY9iWZAzBpCyKfcG08dzgCreSJQ>
 <xmx:QSM9Z7fJ0wft2pV4krDwmKSAXuuIqKVTN4qxsHDI5ynlSkNIA1NXzw>
 <xmx:QSM9Z0MRX3-QjqVo7H5VM2v5JZ4frqftNYjUTb9OvH109WJ8XisBwg>
 <xmx:QSM9Z9knpylJHJ9NQa6g5n6YU0CRCvKNRgqQ53QDJDaNvPqhQ6jacA>
 <xmx:QSM9Z-20X3jWJgMOAMgDf_QQYFLZdNn4PMJSkkAJf94qGML78kaP41T0>
Feedback-ID: i876146a2:Fastmail
Received: by mailuser.phl.internal (Postfix, from userid 501)
 id A61533020083; Tue, 19 Nov 2024 18:46:09 -0500 (EST)
X-Mailer: MessagingEngine.com Webmail Interface
MIME-Version: 1.0
Date: Tue, 19 Nov 2024 18:45:51 -0500
From: "Zack Weinberg" <zack@HIDDEN>
To: maxim.cournoyer@HIDDEN
Message-Id: <f73e7520-9c13-4502-8bc5-09a3b5b3e739@HIDDEN>
In-Reply-To: <202411192128.4AJLSZJg2353369@HIDDEN>
References: <87ed3azenb.fsf@HIDDEN>
 <202411192128.4AJLSZJg2353369@HIDDEN>
Subject: Re: bug#74387: Cannot use Make conditionals
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74387
Cc: 74387 <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.7 (-)

Automake conditionals were originally created because make conditionals aren't portable. In principle, if you are willing to require GNU make (or any other specific Make that has conditionals) you shouldn't *need* Automake conditionals.

Of course, things may not be that simple anymore. Can you please give some examples of the things you are trying to do, that seem to require use of both kinds of conditionals?

zw




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

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


Received: (at 74387) by debbugs.gnu.org; 19 Nov 2024 21:28:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 19 16:28:58 2024
Received: from localhost ([127.0.0.1]:44274 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tDVmM-0002ds-JV
	for submit <at> debbugs.gnu.org; Tue, 19 Nov 2024 16:28:58 -0500
Received: from frenzy.freefriends.org ([198.99.81.75]:35022
 helo=freefriends.org) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <karl@HIDDEN>) id 1tDVmI-0002di-R2
 for 74387 <at> debbugs.gnu.org; Tue, 19 Nov 2024 16:28:55 -0500
X-Envelope-From: karl@HIDDEN
Received: from freefriends.org (localhost [127.0.0.1])
 by freefriends.org (8.16.1/8.16.1) with ESMTPS id 4AJLSZ7E2353370
 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);
 Tue, 19 Nov 2024 14:28:35 -0700
Received: (from apache@localhost)
 by freefriends.org (8.16.1/8.14.7/Submit) id 4AJLSZJg2353369;
 Tue, 19 Nov 2024 14:28:35 -0700
Date: Tue, 19 Nov 2024 14:28:35 -0700
Message-Id: <202411192128.4AJLSZJg2353369@HIDDEN>
From: Karl Berry <karl@HIDDEN>
To: maxim.cournoyer@HIDDEN
Subject: Re: bug#74387: Cannot use Make conditionals
In-Reply-To: <875xoj1h6p.fsf@HIDDEN>
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74387
Cc: 74387 <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 (-)

Hi Maxim,

    the Make conditionals would not work as I expected.  

Since Automake rearranges things quite a lot when generating the
Makefile from Makefile.am, I'm not too surprised there can be problems.

    I could give it another look to see if I
    can distill some interesting points from that experiment

If you have time, it couldn't hurt, though I fear there is no real
solution :(. (At least without automake recognizing every make
conditional, which isn't anything I'll be implementing). --thanks, karl.




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

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


Received: (at 74387) by debbugs.gnu.org; 19 Nov 2024 13:35:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 19 08:35:07 2024
Received: from localhost ([127.0.0.1]:41508 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tDONm-0006DL-Rf
	for submit <at> debbugs.gnu.org; Tue, 19 Nov 2024 08:35:07 -0500
Received: from mail-pg1-f177.google.com ([209.85.215.177]:57659)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maxim.cournoyer@HIDDEN>) id 1tDONl-0006Cl-8v
 for 74387 <at> debbugs.gnu.org; Tue, 19 Nov 2024 08:35:05 -0500
Received: by mail-pg1-f177.google.com with SMTP id
 41be03b00d2f7-7edb6879196so629574a12.3
 for <74387 <at> debbugs.gnu.org>; Tue, 19 Nov 2024 05:35:05 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1732023238; x=1732628038; darn=debbugs.gnu.org;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=fsp752xw7Knwr1Wm/sHaM+FHV+Ap88KkUhZnMe4gOto=;
 b=XxfCp6bIZXK0zm/uGOLLgwhM0JAicwrts91DHXbQRQ4wdQYp6ntJgrimWO+EjWjDby
 4On2JqxI+rDYtykwJGY3rra9T2w/hzH+tsQZIIk1dqLjsHU1E+GnRSwMN6gvPllPBs7Q
 YaQQXkZnO04B4SUG72dZphQmYQlZKRsZshcIJPiCx4BxUp/YBiIgor9JMb+mFWXS+KfZ
 sR+nwYu7tVWEDT8PqrU4IoUHTbbbtUsQN1jCmCgOr684jPgUgUAbV3pRTkfQQUXAMnPL
 hPwHPKJcYXatGsNwi2q1GOJnpXH+++Ewnh8PYW+3/4qe6Alue8y0UI46Ez/GiwckONCT
 EYhg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1732023238; x=1732628038;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=fsp752xw7Knwr1Wm/sHaM+FHV+Ap88KkUhZnMe4gOto=;
 b=XFnqI2si7lTSHHLE0BosW26FtJ0VcR9Dbv8RzPF1ioKLcs1rWJJmFnbAzPk/hkF1WT
 GyhSEiBpLl1Fx27jYpXQh6AjBZWSBs2MN4KU/EIwDoOTdTTMh1gPKnEeaFYy16B/8n2p
 z0VV8gtG4A0ykeVdURps74au76Od6taFtv+x02DRacP8Ds0I3deV+8EeUoeL5OPCgq+d
 dWN1Yl0NPwcrFbmWo95rT11YJvs/daLBXNsvZ+6P6vjs/xapGSc13w/B1wv9Ca56H2q2
 smCZ2Nq0TiYDQoRU+6DOMBSIO7NYSENWSvvJBzBahmmZdpUJMp2DW3R+v8xvttOilytn
 s19w==
X-Gm-Message-State: AOJu0YzfwFBLAjtZazfu7oeGV6aBl7uWT16h9S1z1tyEj+Yoqlmf9O8d
 4P/lKcNgbmGeLOnQMWWyKmmiLtj2cHUL2N7o2zSid10a0M1LFu2NF1bEHA==
X-Google-Smtp-Source: AGHT+IH7etoSiNkpPKve9svbrDW1eGWxU/ZjY+NkLi4LJK7awe2THYg569rNvRxjctL+uZdZZv7PEQ==
X-Received: by 2002:a05:6a20:394d:b0:1d9:87e3:11f3 with SMTP id
 adf61e73a8af0-1dc90b63e40mr22273709637.23.1732023238369; 
 Tue, 19 Nov 2024 05:33:58 -0800 (PST)
Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89])
 by smtp.gmail.com with ESMTPSA id
 d2e1a72fcca58-72477120bd3sm8064309b3a.73.2024.11.19.05.33.56
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 19 Nov 2024 05:33:57 -0800 (PST)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: Karl Berry <karl@HIDDEN>
Subject: Re: bug#74387: Cannot use Make conditionals
In-Reply-To: <202411172235.4AHMZ8ie2140138@HIDDEN> (Karl Berry's
 message of "Sun, 17 Nov 2024 15:35:08 -0700")
References: <202411172235.4AHMZ8ie2140138@HIDDEN>
Date: Tue, 19 Nov 2024 22:33:50 +0900
Message-ID: <875xoj1h6p.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74387
Cc: 74387 <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 (-)

Hi Karl,

Karl Berry <karl@HIDDEN> writes:

> Hi Maxim - thanks for the report and doing the research to find that old
> answer. Do you have any ideas for a better solution? I can't think of
> one. We can't change Automake syntax now. Nor does it seem maintainble
> for automake to have special knowledge of all of make's builtin
> conditionals and match them too.
>
> I'll see about adding something to the manual about the workaround,
> at least. --thanks, karl.

The workaround got rid of the Automake syntax checks, but I faced more
problems passed that.  It was very confusing; the Make conditionals
would not work as I expected.  I could give it another look to see if I
can distill some interesting points from that experiment; I still have
my minimal example around.

-- 
Thanks,
Maxim




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

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


Received: (at 74387) by debbugs.gnu.org; 17 Nov 2024 22:35:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 17 17:35:32 2024
Received: from localhost ([127.0.0.1]:59003 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tCnrf-0002do-RO
	for submit <at> debbugs.gnu.org; Sun, 17 Nov 2024 17:35:32 -0500
Received: from frenzy.freefriends.org ([198.99.81.75]:51568
 helo=freefriends.org) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <karl@HIDDEN>) id 1tCnrc-0002df-Uf
 for 74387 <at> debbugs.gnu.org; Sun, 17 Nov 2024 17:35:29 -0500
X-Envelope-From: karl@HIDDEN
Received: from freefriends.org (localhost [127.0.0.1])
 by freefriends.org (8.16.1/8.16.1) with ESMTPS id 4AHMZ8Cx2140139
 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);
 Sun, 17 Nov 2024 15:35:08 -0700
Received: (from apache@localhost)
 by freefriends.org (8.16.1/8.14.7/Submit) id 4AHMZ8ie2140138;
 Sun, 17 Nov 2024 15:35:08 -0700
Date: Sun, 17 Nov 2024 15:35:08 -0700
Message-Id: <202411172235.4AHMZ8ie2140138@HIDDEN>
From: Karl Berry <karl@HIDDEN>
To: maxim.cournoyer@HIDDEN
Subject: Re: bug#74387: Cannot use Make conditionals (was: Cannot nest Make
 conditionals inside Automake conditionals)
In-Reply-To: <87ldxixxtp.fsf@HIDDEN>
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74387
Cc: 74387 <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 (-)

Hi Maxim - thanks for the report and doing the research to find that old
answer. Do you have any ideas for a better solution? I can't think of
one. We can't change Automake syntax now. Nor does it seem maintainble
for automake to have special knowledge of all of make's builtin
conditionals and match them too.

I'll see about adding something to the manual about the workaround,
at least. --thanks, karl.





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

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


Received: (at 74387) by debbugs.gnu.org; 17 Nov 2024 04:57:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 16 23:57:45 2024
Received: from localhost ([127.0.0.1]:55511 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tCXM1-0003Y3-61
	for submit <at> debbugs.gnu.org; Sat, 16 Nov 2024 23:57:45 -0500
Received: from mail-pf1-f171.google.com ([209.85.210.171]:50564)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maxim.cournoyer@HIDDEN>) id 1tCXLz-0003Xu-CG
 for 74387 <at> debbugs.gnu.org; Sat, 16 Nov 2024 23:57:43 -0500
Received: by mail-pf1-f171.google.com with SMTP id
 d2e1a72fcca58-72487ebd2f5so614491b3a.1
 for <74387 <at> debbugs.gnu.org>; Sat, 16 Nov 2024 20:57:43 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1731819402; x=1732424202; darn=debbugs.gnu.org;
 h=mime-version:message-id:date:user-agent:references:in-reply-to
 :subject:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=FU/RMkfBrvixXvmCqyq8juOoGV0VE2YWXXO1M4ZCtLE=;
 b=I8WCYUsC6qc41KORrL9hl4Ibmh57WqjRsmyJ4d8VGwwWUzzqvJ2M2RHOzfRejeuWSf
 sR8q3FQR6oLOLsUxMGyN+SDtG/gC0ZEvuq9H0jMbfhhPVfOuTwNRtOvSUgFuuqofADlb
 uIEhEAJXDauo/riy3AL7bvrl8+3eynYoInequRg6PXcGdm2nJj4UM1m7Gu/wXnK3bv2T
 NhtbVv/ylV32Q8uRM1N0Efi04fi9aM6bE9ulbucZFUCeXgUPDv29pavd58VQotFEBqzt
 XPraUNgFe9cvZKH9zTcABmXv8AjDEHvNJSYczjDwfaBzF/WFdMAAHwt7hp6HVvxG0khl
 gn2Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1731819402; x=1732424202;
 h=mime-version:message-id:date:user-agent:references:in-reply-to
 :subject:to:from:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=FU/RMkfBrvixXvmCqyq8juOoGV0VE2YWXXO1M4ZCtLE=;
 b=ah6ufoGH9jjrCIhpSbk18uFKIxg6LcMGAW9c9+xUU7DzAAzv0UU6x7Su83Aloig0YR
 dvBfNMGwnUcjsl19HXtHPsN4VbHAMfMRHu+9Hf8F+5Iuhr82DKBPNkUzxBwTbTxuI7H8
 HQ96bcMroDlGsO5eRxVgZVk6NXkr6eUdcSLLELM/pE/iZGQ5T/pXxqKLtPcxTr6jpQsJ
 lrEH8jMnGlnp5FNN5YAXemHMzhlZrSpSPfoAN6yA/9XfDbGelF0UTFPObsZbGD15n4Ef
 Rk//FmY+YcpUcvU9tDoCdWH+jlpaa7FBBccyycUmIVXYX7L9HeviPdGhtYuncWOoyZLV
 LWuQ==
X-Gm-Message-State: AOJu0YzQu/3vdXfNxaRHVapEvRJDtXcjkoe+26FpA6E+G+lfUcgV9XQ7
 QVoQzvhMwiV2vbLDUNDuUSbSdAMFGiTo8KWGxIw/jeIiBcAp2ZQp5d5bmg==
X-Google-Smtp-Source: AGHT+IFWsZhoJkywj3EMjdXfIB43Ilyc4uYmoyF6TlUJH3ql3nEPV6LbDxrIwdJ12RRrJzi4AiPkWQ==
X-Received: by 2002:a05:6a00:1909:b0:71d:f821:1981 with SMTP id
 d2e1a72fcca58-72476b7288bmr10813900b3a.4.1731819401886; 
 Sat, 16 Nov 2024 20:56:41 -0800 (PST)
Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89])
 by smtp.gmail.com with ESMTPSA id
 d2e1a72fcca58-7247720265bsm3791230b3a.191.2024.11.16.20.56.40
 for <74387 <at> debbugs.gnu.org>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 16 Nov 2024 20:56:41 -0800 (PST)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: 74387 <at> debbugs.gnu.org
Subject: Re: bug#74387: Cannot use Make conditionals (was: Cannot nest Make
 conditionals inside Automake conditionals)
In-Reply-To: <87ed3azenb.fsf@HIDDEN> (Maxim Cournoyer's message of "Sun,
 17 Nov 2024 13:07:52 +0900")
References: <87ed3azenb.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
Date: Sun, 17 Nov 2024 13:56:34 +0900
Message-ID: <87ldxixxtp.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74387
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.7 (-)

Hi,

The problem appears simpler than I first thought; it seems Automake is
hard-coded to expect 'endif' to be matched with its own 'if'; causing parsing
errors when attempting to use Make's conditional such as ifdef, ifeq,
etc. that also end with 'endif'.

This was reported 23 years ago here: https://lists.gnu.org/archive/html/bug-automake/2001-11/msg00015.html

There is workaround proposed that makes use of an output variable to hide the
'endif' behind it:

--8<---------------cut here---------------start------------->8---
ENDIF=endif
AC_SUBST(ENDIF)

and to apply this in Makefile.am:
ifdef f
        ..
@ENDIF@
--8<---------------cut here---------------end--------------->8---

I've tested the above and it appear to work, but perhaps Automake could
accommodate Make snippets better?

-- 
Thanks,
Maxim




Information forwarded to bug-automake@HIDDEN:
bug#74387; Package automake. Full text available.
Changed bug title to 'Cannot use ifdef and other Make conditionals' from 'Cannot nest Make conditionals inside Automake conditionals' Request was from Maxim Cournoyer <maxim.cournoyer@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 17 Nov 2024 04:08:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 16 23:08:32 2024
Received: from localhost ([127.0.0.1]:55448 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tCWaN-0001Gb-Tp
	for submit <at> debbugs.gnu.org; Sat, 16 Nov 2024 23:08:32 -0500
Received: from lists.gnu.org ([209.51.188.17]:50808)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maxim.cournoyer@HIDDEN>) id 1tCWaL-0001GR-3l
 for submit <at> debbugs.gnu.org; Sat, 16 Nov 2024 23:08:30 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <maxim.cournoyer@HIDDEN>)
 id 1tCWaA-0005PT-SL
 for bug-automake@HIDDEN; Sat, 16 Nov 2024 23:08:24 -0500
Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <maxim.cournoyer@HIDDEN>)
 id 1tCWZx-0005jF-1F
 for bug-automake@HIDDEN; Sat, 16 Nov 2024 23:08:17 -0500
Received: by mail-pg1-x52d.google.com with SMTP id
 41be03b00d2f7-7f3da2c2cb5so2277362a12.2
 for <bug-automake@HIDDEN>; Sat, 16 Nov 2024 20:08:03 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1731816481; x=1732421281; darn=gnu.org;
 h=mime-version:message-id:date:subject:to:from:from:to:cc:subject
 :date:message-id:reply-to;
 bh=NWTYhlqfH+nAzV9GWVczK4RpQSurp7h3Tkf/f+C/FnA=;
 b=ZspAgoNGATa5qwK1kO0YgsNpLue60UaCkFP7X7LNNtPnY7I2Dcm2nZhzfa6yJ2iG8p
 g3hNBsCaSdXuKFo6ytBG7Th9fhU3gotcUxbFhWxr+gFCetRkEC/89ioGYxFOOz7nsmPt
 6PW2Je6hPrdLFTpj4uWIG9PQP5KjEKwqhQd7UD9lR9QRXmUPCI+YyBg/I4qrqGzGF9Uj
 Q8uITQPDaab9hRGd1naBSwYO2jP4l9CjuUIoKHCeTR18Djl1RuT8MYAZdNMsAbzRWIW6
 anpcfwl39OG543pPZFA86nvcwovF2txKm9ayRYVorcRwNxdHDAciVSguDYP3g6Ddejiu
 13Mw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1731816481; x=1732421281;
 h=mime-version:message-id:date:subject:to:from:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=NWTYhlqfH+nAzV9GWVczK4RpQSurp7h3Tkf/f+C/FnA=;
 b=OUC44zOSwZqnplGgiKkBtUe4np3BkS7wPLspJ36HUlEm7e9gr9IhAyWnBxYieZsR2+
 CSRXxLIf95yggyn7xPjGLNjDv9gBDNzsBA3KyYzavrSj83s58NxsFP5RkF1XBKBXhhb0
 bvAwiPXatwjQLxj5HRIq6juE+eYFU/5W9QwumrS32ZSLmeFfEAhS54a9gthGvacjJFIv
 c35PnsNPYn6Oe7XlOmO4iD1zXDCmODhT67yraWzg2ZchRuQcIhjOpjoNQj91VadkxEGN
 ARYPvvOd/oGIipwW2ztkY39bgaxplOpzc+1AeJOJa6eoLvBIrVF1kqL9Tdk5BvZEaMiT
 6jng==
X-Gm-Message-State: AOJu0Yw2q0X6EHa2UqOpZ1fzI8GMp5+ZD6hk2si35iaB3snRgKSgVddo
 u4rvTOqdQ2MYCbhNMInyVytVoRoK+dfcy15r4u52JOc242aOy2RDEmXCOA==
X-Google-Smtp-Source: AGHT+IEltqnxQ+dVyFoUx5kgKApx7u99bwgEazM7tiLg9pooGsPPCL9c+Sy7+vwhjIsk3zQTGAp0UA==
X-Received: by 2002:a17:902:d588:b0:211:eb00:63bf with SMTP id
 d9443c01a7336-211eb00650cmr70959175ad.42.1731816481003; 
 Sat, 16 Nov 2024 20:08:01 -0800 (PST)
Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89])
 by smtp.gmail.com with ESMTPSA id
 d9443c01a7336-21203265603sm8590475ad.239.2024.11.16.20.07.58
 for <bug-automake@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 16 Nov 2024 20:07:59 -0800 (PST)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: bug-automake@HIDDEN
Subject: Cannot nest Make conditionals inside Automake conditionals
Date: Sun, 17 Nov 2024 13:07:52 +0900
Message-ID: <87ed3azenb.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=2607:f8b0:4864:20::52d;
 envelope-from=maxim.cournoyer@HIDDEN; helo=mail-pg1-x52d.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
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: -2.3 (--)

--=-=-=
Content-Type: text/plain

Hello,

Consider the following:

--8<---------------cut here---------------start------------->8---
$ guix shell --pure automake autoconf coreutils grep \
  --with-latest=automake --with-latest=autoconf --without-tests=automake

[...]

[env]$ autoconf --version
autoconf (GNU Autoconf) 2.72
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
<https://gnu.org/licenses/gpl.html>, <https://gnu.org/licenses/exceptions.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David J. MacKenzie and Akim Demaille.

[env]$ automake --version
automake (GNU automake) 1.17
Features: subsecond-mtime

Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later
  <https://gnu.org/licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Tom Tromey <tromey@HIDDEN>
       and Alexandre Duret-Lutz <adl@HIDDEN>.

[env]$ cat configure.ac
AC_INIT([if-without-endif-bug], [0.0.0])

AM_INIT_AUTOMAKE([foreign])

AM_CONDITIONAL([CAN_RUN_TESTS], [true])

AC_CONFIG_FILES([Makefile])

AC_OUTPUT

[env]$ cat Makefile.am
if CAN_RUN_TESTS

SH_TESTS = dummy/test1.sh dummy/test2.sh
SH_TESTS_SLOW = dummy/slow-test.sh

TESTS = $(SH_TESTS)

# By default, filter out slow tests.  The slow tests can be requested
# by setting the WITH_SLOW_TESTS Make variable.
ifdef WITH_SLOW_TESTS
TESTS += $(SH_TESTS_SLOW)
else
$(info Skipping slow tests; set WITH_SLOW_TESTS=1 to run them)
endif

endif

$ autoreconf -vif
autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force 
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: /gnu/store/6vdjwn5yjnwir2279h0mfc5ws9wnz8d7-autoconf-2.72/bin/autoconf --force
autoreconf: configure.ac: not using Autoheader
autoreconf: running: automake --add-missing --copy --force-missing
Makefile.am:16: error: endif without if
autoreconf: error: automake failed with exit status: 1
--8<---------------cut here---------------end--------------->8---

In other words, Automake doesn't handle nesting pure Make conditionals
(ifeq, ifneq, ifdef, offended) inside an Automake conditional block (if).

My attaching the configure.ac and Makefile.am files for convenience.

--=-=-=
Content-Type: application/octet-stream
Content-Disposition: attachment; filename=configure.ac
Content-Transfer-Encoding: base64

QUNfSU5JVChbaWYtd2l0aG91dC1lbmRpZi1idWddLCBbMC4wLjBdKQoKQU1fSU5JVF9BVVRPTUFL
RShbZm9yZWlnbl0pCgpBTV9DT05ESVRJT05BTChbQ0FOX1JVTl9URVNUU10sIFt0cnVlXSkKCkFD
X0NPTkZJR19GSUxFUyhbTWFrZWZpbGVdKQoKQUNfT1VUUFVUCg==
--=-=-=
Content-Type: application/octet-stream
Content-Disposition: attachment; filename=Makefile.am
Content-Transfer-Encoding: base64

aWYgQ0FOX1JVTl9URVNUUwoKU0hfVEVTVFMgPSBkdW1teS90ZXN0MS5zaCBkdW1teS90ZXN0Mi5z
aApTSF9URVNUU19TTE9XID0gZHVtbXkvc2xvdy10ZXN0LnNoCgpURVNUUyA9ICQoU0hfVEVTVFMp
CgojIEJ5IGRlZmF1bHQsIGZpbHRlciBvdXQgc2xvdyB0ZXN0cy4gIFRoZSBzbG93IHRlc3RzIGNh
biBiZSByZXF1ZXN0ZWQKIyBieSBzZXR0aW5nIHRoZSBXSVRIX1NMT1dfVEVTVFMgTWFrZSB2YXJp
YWJsZS4KaWZkZWYgV0lUSF9TTE9XX1RFU1RTClRFU1RTICs9ICQoU0hfVEVTVFNfU0xPVykKZWxz
ZQokKGluZm8gU2tpcHBpbmcgc2xvdyB0ZXN0czsgc2V0IFdJVEhfU0xPV19URVNUUz0xIHRvIHJ1
biB0aGVtKQplbmRpZgoKZW5kaWYK
--=-=-=
Content-Type: text/plain


Thanks for maintaining Automake!

-- 
Maxim

--=-=-=--




Acknowledgement sent to Maxim Cournoyer <maxim.cournoyer@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-automake@HIDDEN. Full text available.
Report forwarded to bug-automake@HIDDEN:
bug#74387; 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: Sun, 12 Jan 2025 05:45:02 UTC

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