From unknown Sat Aug 16 15:57:24 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#79049 <79049@debbugs.gnu.org> To: bug#79049 <79049@debbugs.gnu.org> Subject: Status: ChangeLog is added to distribution even when inside a false conditional Reply-To: bug#79049 <79049@debbugs.gnu.org> Date: Sat, 16 Aug 2025 22:57:24 +0000 retitle 79049 ChangeLog is added to distribution even when inside a false c= onditional reassign 79049 automake submitter 79049 Tomas Volf <~@wolfsden.cz> severity 79049 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 19 10:00:01 2025 Received: (at submit) by debbugs.gnu.org; 19 Jul 2025 14:00:01 +0000 Received: from localhost ([127.0.0.1]:43042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ud86a-0001wY-Q0 for submit@debbugs.gnu.org; Sat, 19 Jul 2025 10:00:01 -0400 Received: from lists.gnu.org ([2001:470:142::17]:52332) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1ud86Y-0001vw-Ng for submit@debbugs.gnu.org; Sat, 19 Jul 2025 09:59:59 -0400 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 <~@wolfsden.cz>) id 1ud86B-0008Fr-Pr for bug-automake@gnu.org; Sat, 19 Jul 2025 09:59:38 -0400 Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1ud868-00022x-QZ for bug-automake@gnu.org; Sat, 19 Jul 2025 09:59:35 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 5BCCD396D87; Sat, 19 Jul 2025 13:59:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1752933568; bh=k5Zg8ICEMK0j2cV5dDRIPfHd2Mu8RdbCBM7BZ2o2OEc=; h=From:To:Subject:Date; b=FlhCT9U5u2YNNsfbEyHwh23GJ+Rg0bYejEGsnm+kIdovkZ1HXRVod5ilz12EhVmhH zoINLmI36Vt4XQoIEcbZ92MWtjRriH90F9wDufdfRBZJ/fmGglH747XFonB23Gyx3r za+KEpGk97rrJPuUlFw0KWuzkGwv7XnfjsaL0XjYFynsxTgUQFn8ckEE1qHNNqub8J RGEsCgAhzHrYBEjaWJLA7lVsGOd3mEpiLlORb56sJwuBBmpJduAroCT39Ckcu8MRxB mVN400u+f+LZYyBGZSheUB9S4bZr9ZudKZB4yflB8WMHJpUhQ2daY+BNqDzsC6Hpkk 1zN+b9QR2B/XiMbXG0RyO3YMQDsHm2XVhEv6RulC0k2mhMFxQJxsVytfLbQKEPnji5 K+z1sFZ+v1fufcNayioK5ZNXZ5+CMd+VWj20p6hv9UxiFtW68ik5dWOsLfrGY2rGqh mytIEltkighKxlFYIwBOgom28TROzF/1Rq1MhMwksBLsFKz5TPws9MsRUD3nyT1BlI an6o00v10cQp65ZfUuEZS+CyoKc0hDY+z5GZLDCAHFcaZoGvCOoCtVc82DVtCPBWCJ aM/BuCpJTFxeiQIQwb+5CZPayU9Z3Sa3Zd3MiSbDcrl1rPHrS88PBYiXRTAHrjwfhN SdWsdkZ6F4e0hVYZmI6TRLiI= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 19CC03964A9 for ; Sat, 19 Jul 2025 13:59:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1752933567; bh=k5Zg8ICEMK0j2cV5dDRIPfHd2Mu8RdbCBM7BZ2o2OEc=; h=From:To:Subject:Date; b=IBdtghVVBca9L2gYEW71c1xBEFkJtrLYieDGs/5Vy0KgtNNVrMNIFlq63I2TfA5Mv MSY8IoHEwqih7n+8e09J32MF/6iig72WvddQPXN0IJcwKb6dboWjqFbDS9luFVLWvq kupDPqiU4BuR2imkmv7NlGvxAB6DCDx/P7OFxWrl1oOh8cHSpIp/hrG85kiU6TGUAE YKbfZ2auVLDAGD1Lw7xfqAo5WCH0udpvOo0CfQN7g2nPrFk3sbbdZB2n6sLAnkgfSZ ILBqIeeEu0x6MMC4Do5t0GChAsaBjRc5JwpBFY4ODGBP2bD6MCQTisKGzqFEcz74d5 aBcRTDW3FraFq9sJgwR83JJUny6dEKR+CzUAaz1Zoe8xq2AfWajsd9sg//lxqUnENp YPg8F+4uCZAoE6h8MUzVMZoO+FE1Weq3cMIQUiIMRqEr637sKWV0K+j/PCP78n9Azk LG7zfCG3XTNQ6ZJNTQU68DW9wBJxfbDbIpaqIpEu6wuFUfzik8qv3A15lPh2pwm48Y AqtBnmgmDtZ/OAWyCVu+PUHmv0T2W+YIjdGlT8PnDx4EM5VHbwIJnxnX/Ctk9KdsK7 RxzQXrAFOk6YVS+Ixh08buJ2B6cfqvjuBrGTtcTvntJYgUiAWn600cdlhhOKg0sj9s G/iThbNHuXmoxq1jALyHpzAo= From: Tomas Volf <~@wolfsden.cz> To: bug-automake@gnu.org Subject: ChangeLog is added to distribution even when inside a false conditional Mail-Followup-To: bug-automake@gnu.org Date: Sat, 19 Jul 2025 15:59:20 +0200 Message-ID: <87cy9w2sef.fsf@wolfsden.cz> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=37.205.8.62; envelope-from=~@wolfsden.cz; helo=wolfsden.cz 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, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello, when you have a rule to generate ChangeLog inside a conditional, the file is always added to am__DIST_COMMON, even when the conditional is false. This leads to a failure to build the tarball, since the ChangeLog file nor the rule to build it exist. I suspect it might be a bug. Following two files are enough to reproduce it: configure.ac: --8<---------------cut here---------------start------------->8--- AC_PREREQ([2.71]) AC_INIT([foo], [1]) AM_INIT_AUTOMAKE([foreign]) AM_CONDITIONAL([DISTRIBUTE_CHANGELOG], [false]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT --8<---------------cut here---------------end--------------->8--- Makefile.am: --8<---------------cut here---------------start------------->8--- if DISTRIBUTE_CHANGELOG ChangeLog: echo nop endif --8<---------------cut here---------------end--------------->8--- When I try to build a distribution tarball out of this, I am told: --8<---------------cut here---------------start------------->8--- $ autoreconf -vfi . && ./configure && make dist 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/9gzl76xq8pz6hdrgai6ydnvmi13226xh-autoconf-2.71/bin/autoconf --force autoreconf: configure.ac: not using Autoheader autoreconf: running: automake --add-missing --copy --force-missing configure.ac:3: installing './install-sh' configure.ac:3: installing './missing' autoreconf: Leaving directory '.' checking for a BSD-compatible install... /gnu/store/8awm79px539lwhg6gczh4h3nx5kfdj1c-profile/bin/install -c checking whether build environment is sane... yes checking for a race-free mkdir -p... /gnu/store/8awm79px539lwhg6gczh4h3nx5kfdj1c-profile/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile make dist-gzip am__post_remove_distdir='@:' make[1]: Entering directory '/tmp/automake-repro' make distdir-am make[2]: Entering directory '/tmp/automake-repro' make[2]: *** No rule to make target 'ChangeLog', needed by 'distdir-am'. Stop. make[2]: Leaving directory '/tmp/automake-repro' make[1]: *** [Makefile:261: distdir] Error 2 make[1]: Leaving directory '/tmp/automake-repro' make: *** [Makefile:342: dist] Error 2 --8<---------------cut here---------------end--------------->8--- Notice that it tries to find ChangeLog, however fails to do so, since the rule is commented out (due to the conditional). After some more digging, I think the problem is handle_dist function, specifically this part: --8<---------------cut here---------------start------------->8--- if (dir_has_case_matching_file ($relative_dir, $cfile) # The file might be absent, but if it can be built it's ok. || rule $cfile) { push_dist_common ($cfile); } --8<---------------cut here---------------end--------------->8--- There is this bullet point in the manual mentioning something like this: > Automake has another built-in list of files automatically distributed > if they are found either with the plain name, or with extension .md > (presumably MarkDown, though this not checked). They are checked for > in that order, so the plain name is preferred. These are: AUTHORS > ChangeLog INSTALL NEWS README README-alpha THANKS. So I think there are two problems: 1. The documentation does not mention this happens even if just a rule is found. 2. The code does not respect that the rule is if-ed away. Have a nice day, Tomas Volf -- There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 19 18:08:42 2025 Received: (at 79049) by debbugs.gnu.org; 19 Jul 2025 22:08:42 +0000 Received: from localhost ([127.0.0.1]:45596 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1udFjS-0004DA-0P for submit@debbugs.gnu.org; Sat, 19 Jul 2025 18:08:41 -0400 Received: from frenzy.freefriends.org ([198.99.81.75]:58008 helo=freefriends.org) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1udFjO-0004Cy-UY for 79049@debbugs.gnu.org; Sat, 19 Jul 2025 18:08:35 -0400 X-Envelope-From: karl@freefriends.org Received: from freefriends.org (localhost [127.0.0.1]) by freefriends.org (8.16.1/8.16.1) with ESMTPS id 56JM8Xx5941076 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Sat, 19 Jul 2025 16:08:33 -0600 Received: (from apache@localhost) by freefriends.org (8.16.1/8.14.7/Submit) id 56JM8XY2941075; Sat, 19 Jul 2025 16:08:33 -0600 Date: Sat, 19 Jul 2025 16:08:33 -0600 Message-Id: <202507192208.56JM8XY2941075@freefriends.org> From: Karl Berry To: ~@wolfsden.cz Subject: Re: bug#79049: ChangeLog is added to distribution even when inside a false conditional In-Reply-To: <87cy9w2sef.fsf@wolfsden.cz> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79049 Cc: 79049@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Thanks for the report and looking into the code. There have been previous reports relating to targets and conditionals, e.g., https://debbugs.gnu.org/cgi/bugreport.cgi?bug=13940 (from 2013 ...) and I think it's been mentioned in mail and elsewhere, too. Updating the doc is no problem, thanks. But I'm not sure how to do a real fix. The conditional might be defined at configure-time, so automake can't know whether it's true or not when it's running, as far as I can see. Maybe you or someone else has a clearer idea of how to proceed? --thanks, karl. From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 20 15:58:22 2025 Received: (at 79049) by debbugs.gnu.org; 20 Jul 2025 19:58:22 +0000 Received: from localhost ([127.0.0.1]:52140 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1udaAv-0004z0-LI for submit@debbugs.gnu.org; Sun, 20 Jul 2025 15:58:21 -0400 Received: from wolfsden.cz ([37.205.8.62]:55312) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1udaAq-0004yZ-Rk for 79049@debbugs.gnu.org; Sun, 20 Jul 2025 15:58:20 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id E92E039D9F7; Sun, 20 Jul 2025 19:58:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1753041494; bh=1nmT4mKtfQUIu+g1uUNoX26S/sSv6pNuJyd+YLRZ38g=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=W8zJfl3QfHLdoU2sjV0rqKyZx0bBMIAJugOtt/EHSZiGdqbRXwCuInUlY0K4++nuh iHDbdwIbzAYNbfkLmKhq9Cnav2azAaKFcrb39UovMBN8e78y2DOMD9vlztAEUqOM05 GF51GeR4uWd5Ij5JD6IRGYwpO4B9lDb/LghFCOOAcmJKswFxCmrul8orfioMuWb8we lINVWqIoCCevAOJKqKz2AsKgV8jtMNngO33X+kPSvzutfPagPpUzRYiIwSBdXDrQvu cE4m+m44J+xCv+ooVTmefA2glQtAV/9AwFMJD4FCHapDKe2NzLapGaLzdj+bJFz3w5 /z/u6U7WN7QQSzS7ArVaDAnyoh+zb9JdnNWKUvWLRR2817l5oytPP9ELqCKfV4oCSv OdmnxIuFBKXHPwHwdWwBPMWILJg+ZQcChhdaclNURKLOa72I7zfFnOUoNzQGnuvLVO RFtbyYC23SxUUm/M4/Xr80elRkOTQWJ/Ti+sgIhTAF4W/ztuXdH52g7ILkzWsQa6Sh p4GkznuSW+WIFXuGqu7oXkTu4yAiwqsFdKizialSd3DEC9ue31tPJb/iMIE9XU0WGS NOGUzZngIPJuw8yMoKd3x0u+wPvtEcsx1m672jDiGT+4orb9i7CvTzh3lBd1jJXcdM CIUHMYbe7isWoso1I9jDg6hA= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 78A8239E06B; Sun, 20 Jul 2025 19:58:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1753041494; bh=1nmT4mKtfQUIu+g1uUNoX26S/sSv6pNuJyd+YLRZ38g=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=W8zJfl3QfHLdoU2sjV0rqKyZx0bBMIAJugOtt/EHSZiGdqbRXwCuInUlY0K4++nuh iHDbdwIbzAYNbfkLmKhq9Cnav2azAaKFcrb39UovMBN8e78y2DOMD9vlztAEUqOM05 GF51GeR4uWd5Ij5JD6IRGYwpO4B9lDb/LghFCOOAcmJKswFxCmrul8orfioMuWb8we lINVWqIoCCevAOJKqKz2AsKgV8jtMNngO33X+kPSvzutfPagPpUzRYiIwSBdXDrQvu cE4m+m44J+xCv+ooVTmefA2glQtAV/9AwFMJD4FCHapDKe2NzLapGaLzdj+bJFz3w5 /z/u6U7WN7QQSzS7ArVaDAnyoh+zb9JdnNWKUvWLRR2817l5oytPP9ELqCKfV4oCSv OdmnxIuFBKXHPwHwdWwBPMWILJg+ZQcChhdaclNURKLOa72I7zfFnOUoNzQGnuvLVO RFtbyYC23SxUUm/M4/Xr80elRkOTQWJ/Ti+sgIhTAF4W/ztuXdH52g7ILkzWsQa6Sh p4GkznuSW+WIFXuGqu7oXkTu4yAiwqsFdKizialSd3DEC9ue31tPJb/iMIE9XU0WGS NOGUzZngIPJuw8yMoKd3x0u+wPvtEcsx1m672jDiGT+4orb9i7CvTzh3lBd1jJXcdM CIUHMYbe7isWoso1I9jDg6hA= From: Tomas Volf <~@wolfsden.cz> To: Karl Berry Subject: Re: bug#79049: ChangeLog is added to distribution even when inside a false conditional In-Reply-To: <202507192208.56JM8XY2941075@freefriends.org> (Karl Berry's message of "Sat, 19 Jul 2025 16:08:33 -0600") References: <202507192208.56JM8XY2941075@freefriends.org> Date: Sun, 20 Jul 2025 21:58:13 +0200 Message-ID: <875xfm1voq.fsf@wolfsden.cz> 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: 79049 Cc: 79049@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Karl Berry writes: > Thanks for the report and looking into the code. There have been > previous reports relating to targets and conditionals, e.g., > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=13940 (from 2013 ...) > and I think it's been mentioned in mail and elsewhere, too. > > Updating the doc is no problem, thanks. But I'm not sure how to do a > real fix. The conditional might be defined at configure-time, so > automake can't know whether it's true or not when it's running, as far > as I can see. Hm, this is very good point I failed to realize. > Maybe you or someone else has a clearer idea of how to proceed? Dropping the magic related to these special files is probably not possible now, so only realistic option I see is to document the edge case and move on. Not great, so I hope someone will have a better idea. :/ Tomas -- There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 24 12:00:41 2025 Received: (at 79049) by debbugs.gnu.org; 24 Jul 2025 16:00:41 +0000 Received: from localhost ([127.0.0.1]:57797 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ueyN6-0007Xx-Dk for submit@debbugs.gnu.org; Thu, 24 Jul 2025 12:00:40 -0400 Received: from frenzy.freefriends.org ([198.99.81.75]:50798 helo=freefriends.org) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ueyMy-0007WN-RA for 79049@debbugs.gnu.org; Thu, 24 Jul 2025 12:00:37 -0400 X-Envelope-From: karl@freefriends.org Received: from freefriends.org (localhost [127.0.0.1]) by freefriends.org (8.16.1/8.16.1) with ESMTPS id 56OG0Uk8023980 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 24 Jul 2025 10:00:30 -0600 Received: (from apache@localhost) by freefriends.org (8.16.1/8.14.7/Submit) id 56OG0TlN023979; Thu, 24 Jul 2025 10:00:29 -0600 Date: Thu, 24 Jul 2025 10:00:29 -0600 Message-Id: <202507241600.56OG0TlN023979@freefriends.org> From: Karl Berry To: ~@wolfsden.cz Subject: Re: bug#79049: ChangeLog is added to distribution even when inside a false conditional In-Reply-To: <87cy9w2sef.fsf@wolfsden.cz> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79049 Cc: 79049@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) if DISTRIBUTE_CHANGELOG ChangeLog: echo nop endif I haven't had a chance to test this, but how about making the conditional merely define a variable, and a fallback ChangeLog rule, as in: if DISTRIBUTE_CHANGELOG ChangeLog_target = ChangeLog else ChangeLog_target = no_ChangeLog ChangeLog: endif $(ChangeLog_target): make changelog I admit I still haven't got my mind wrapped very firmly around this scenario :), so I might be way off. Just a thought. --best, karl. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 26 09:46:03 2025 Received: (at 79049) by debbugs.gnu.org; 26 Jul 2025 13:46:04 +0000 Received: from localhost ([127.0.0.1]:41411 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uffDv-0003w4-J3 for submit@debbugs.gnu.org; Sat, 26 Jul 2025 09:46:03 -0400 Received: from wolfsden.cz ([37.205.8.62]:54192) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1uffDr-0003v8-EL for 79049@debbugs.gnu.org; Sat, 26 Jul 2025 09:46:01 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 197C326DCF7; Sat, 26 Jul 2025 13:45:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1753537557; bh=Z7M/IRel5R2PawrxTodS4LHySE8AV2H2i/sgFrAX0Os=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=xgPxahfV755R2x0XAb1rGyKZ3n0pOLiaW9iAD3Ek3LaUY3RrxNfrezPjurBTUwfom tV0R0kJjSvQzTLCLWw9ka4HHzs5m6AapcPiZqbo+7H1CjAfrZXT92rgoqoK0AWQHrr E0/54wbJ87LHTArMKj7F++SpMs0MTGUrpAxRs7T3us1UJbUPSFI74hl8W6trJCDyv0 ZbIAMymjA9JLuBOU+4G+4bw28qQIjL1DDY02b9AZHGwdXWsefcJIEJwAT+TJv/HG5e /YpI4exm5Ynfdwu/7K3UtV9/YjrXD3Ryux6uXMxZqK96FKWskE4fuTGMJGUJEePiJ3 bNvbWF5BaJQHgxfKICzVsccKkxXd/cLG5nyAHCe6XvUd9dnOp88+ih3nEdjuoAgryc RUqh/EitIexpA4k2ydFNXRqSJ8VyIGlMKZESErfj76p+rnGY6CYoIb3cP29bSgr4lM fe3spt1s9I57tjbN0CZz5TI+Y11sg2oF53iPmb4uXWj3tkpK8UqCDfAlmvqK7bQ6o8 aDxNVtdLhK5f3s9kF5VsZE8GjHo2wsPseNcDLMoFCPiuUS5X8vDkKWNVrYRFf8mF/E EAtbesTm+IkU5MdRdk/TI4uOC4xF9v/rsovIgexcfHzWkTm4U5SqvvAOidZNezLce7 2KEzt3lg29KLz9pRpRZKqJxo= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 6B1F426E755; Sat, 26 Jul 2025 13:45:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1753537556; bh=Z7M/IRel5R2PawrxTodS4LHySE8AV2H2i/sgFrAX0Os=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=BKMr1aIotLqppThTPVD0o4voO/nPnJg3uByhehSIgcljC0EMRIxmCTwfbVvp1y5PM Y4R/Sqf9hv2EfPndNCvRzYUQkosDz5ig0SUTWlXUPOaWWG5+Kq8JeYu7qq+t4UBIM2 89XPfgY+QnfiVMeh1vJVyOLQQqNbwOrBYtXGyXhQ9hRN4HWOk1Q0UbmQYBErV3zDtv JZN/kpOULG9DDr6oufI4RQVh4UeQNTc0wOzYXlM2efv7dLH20TgJsf39cOTZWt8q0D qUvnKM0pBE4AH3wZbcbbL+JqpqnBnGInR7s8iP5ztmpTt7h4k7rC2dNErmTC4Bi7+/ 2ShS1bSGnEuHQMQxR/6kF9tv53NbHGI2V5ZYcNX8X1cFXORMweD4Us46BUWWPw1KfI XvyKMmSeUJtvDKieTeu6qhpp62zgIE8EMV6qHPUMkpWANnTxq1U0Z4E27UNw3u+g5M nhzmsJV2VHtfCR4HUKU/5cWfE4EFe3SCFHxu9G+pjsyTBCsjpfUMmUwuSQJgizZiLl C3aQj4VnSA46Mb1XEOGQjXrRc5LKwn97s6QJy0v8yb7WG811RHCseFw4nARZtIcj4B NWuiW2JSi5uciz8Uiz3y/AB6nO3riHtA+eKUmJhaNqCKOlbzBQYmzhxOrsqJVVBkEH e3EeSkeVOqq9ZFattSol2n34= From: Tomas Volf <~@wolfsden.cz> To: Karl Berry Subject: Re: bug#79049: ChangeLog is added to distribution even when inside a false conditional In-Reply-To: <202507241600.56OG0TlN023979@freefriends.org> (Karl Berry's message of "Thu, 24 Jul 2025 10:00:29 -0600") References: <202507241600.56OG0TlN023979@freefriends.org> Date: Sat, 26 Jul 2025 15:45:55 +0200 Message-ID: <87o6t783qk.fsf@wolfsden.cz> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 79049 Cc: 79049@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Karl Berry writes: > if DISTRIBUTE_CHANGELOG > ChangeLog: > echo nop > endif > > I haven't had a chance to test this, but how about making the conditional > merely define a variable, and a fallback ChangeLog rule, as in: > > if DISTRIBUTE_CHANGELOG > ChangeLog_target =3D ChangeLog > else > ChangeLog_target =3D no_ChangeLog > ChangeLog: > endif > $(ChangeLog_target): > make changelog > > I admit I still haven't got my mind wrapped very firmly around this > scenario :), so I might be way off. Just a thought. --best, karl. That is brilliant! I needed to add the ChangeLog into EXTRA_DIST manually, but on the other hand, there does not seem to be any need for the targets to differ. The following seems -- as verified by some casual testing -- to do what I want: =2D-8<---------------cut here---------------start------------->8--- if DISTRIBUTE_CHANGELOG EXTRA_DIST +=3D ChangeLog endif ChangeLog =3D ChangeLog $(ChangeLog): [... bunch of git log mangling ...] =2D-8<---------------cut here---------------end--------------->8--- Thanks a lot, this is quite clever way to side-step the issue. ^_^ Should I attempt to write a patch documenting this workaround or is this too niche of a problem? Tomas =2D-=20 There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJCBAEBCgAsFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmiE3BMOHH5Ad29sZnNk ZW4uY3oACgkQL7/ufbZ/wakHthAAhIhvUj2+ycMJSL9I3hpXs0WRkHL7lrbtkbYZ MScUCtuWuhihNvrUDnLWpWgAjYpDOa0WsaS7XIVeV6/1u/do/hTbq57rmFQ2CZxa muAoWZ0L8skppfCmBlqZAOcE2Cw9JGbNc6xcYJiEgtiSzwgq6utHsHC8lz5X+X9G Ipi4ijFVmhcp8JnxNqYC50BEi3PVSyfiMIDG4EZ3RcBxGrmqbOXKUm/kW6+le/7q 3LZ+nwM15KxNuP2xqpiBeCxYtUhXXo7KcXNUp2APkU/MuUhUhNNqKqhx3FLXvPOy wVqYXtapev0AQYbsd2ZprStGU9BH4tFy+rciL9fefmRMuuu/PeBibeVomQ3/mRJe Hu+KSiKTMEhumSABcwbEhWAsmO/1nLGu2MA0cTHXB51UQYPZfxbU2x46VQXZxqJg v3Wj9+lwwQBVfj5DKp/wGBXESnocqwiP0UKe9UCwsO2QRQ5fWQVpBt9ag0IkWhN0 /p5b9/bZqASCtO1VJ21r+Gse5Z0x+W8WC32pSvZy4HQUJvf2NV0DMyEKxzH15ja2 7HspUbHCwA/8URgqxUWN4CiVi3fwf4z2Nivd/vXl4FhgLbXkh2X7NM/0+FUFIsV1 yaVvlIAp396iVvWSUQVhoPUPfzIyCMIY9MdauBUx20xFA4FKiV8ddsYsmwlSmiOK /bTF0Ww= =FPV+ -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 26 16:29:11 2025 Received: (at 79049) by debbugs.gnu.org; 26 Jul 2025 20:29:11 +0000 Received: from localhost ([127.0.0.1]:45395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uflW2-0002ws-Ux for submit@debbugs.gnu.org; Sat, 26 Jul 2025 16:29:11 -0400 Received: from frenzy.freefriends.org ([198.99.81.75]:48364 helo=freefriends.org) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uflW0-0002wf-Fj for 79049@debbugs.gnu.org; Sat, 26 Jul 2025 16:29:09 -0400 X-Envelope-From: karl@freefriends.org Received: from freefriends.org (localhost [127.0.0.1]) by freefriends.org (8.16.1/8.16.1) with ESMTPS id 56QKT644046619 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Sat, 26 Jul 2025 14:29:06 -0600 Received: (from apache@localhost) by freefriends.org (8.16.1/8.14.7/Submit) id 56QKT5Po046618; Sat, 26 Jul 2025 14:29:05 -0600 Date: Sat, 26 Jul 2025 14:29:05 -0600 Message-Id: <202507262029.56QKT5Po046618@freefriends.org> From: Karl Berry To: ~@wolfsden.cz Subject: Re: bug#79049: ChangeLog is added to distribution even when inside a false conditional In-Reply-To: <87o6t783qk.fsf@wolfsden.cz> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79049 Cc: 79049@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) The following seems -- as verified by some casual testing -- to do what I want: Yay! Your code looks nice. Should I attempt to write a patch documenting this workaround or is this too niche of a problem? A patch for the documentation would be welcome, sure. Don't worry about exact wording or anything, since I'll most likely do plenty of tweaking anyway :). --thanks, karl.