From unknown Sat Aug 16 16:55:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24507: noinst_PYTHON breaks uninstall of Python files Resent-From: Akim Demaille Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Thu, 22 Sep 2016 09:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 24507 X-GNU-PR-Package: automake X-GNU-PR-Keywords: To: 24507@debbugs.gnu.org X-Debbugs-Original-To: Automake Bugs Received: via spool by submit@debbugs.gnu.org id=B.14745377081828 (code B ref -1); Thu, 22 Sep 2016 09:49:01 +0000 Received: (at submit) by debbugs.gnu.org; 22 Sep 2016 09:48:28 +0000 Received: from localhost ([127.0.0.1]:60213 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bn0cA-0000TK-TG for submit@debbugs.gnu.org; Thu, 22 Sep 2016 05:48:28 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52651) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bn0c9-0000T8-AP for submit@debbugs.gnu.org; Thu, 22 Sep 2016 05:48:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bn0c2-0007CL-UM for submit@debbugs.gnu.org; Thu, 22 Sep 2016 05:48:15 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:37119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bn0c2-0007CH-Rh for submit@debbugs.gnu.org; Thu, 22 Sep 2016 05:48:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bn0c1-0000kC-GY for bug-automake@gnu.org; Thu, 22 Sep 2016 05:48:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bn0bx-00078t-CN for bug-automake@gnu.org; Thu, 22 Sep 2016 05:48:12 -0400 Received: from smtp.lrde.epita.fr ([163.5.55.2]:48577 helo=kaboul.lrde.epita.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bn0bx-00075N-50 for bug-automake@gnu.org; Thu, 22 Sep 2016 05:48:09 -0400 Received: from erebus.lrde.epita.fr (erebus.lrde.epita.fr [192.168.101.165]) by kaboul.lrde.epita.fr (Postfix) with ESMTPSA id 4A5BF48C79 for ; Thu, 22 Sep 2016 11:48:00 +0200 (CEST) From: Akim Demaille Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-Id: Date: Thu, 22 Sep 2016 11:48:00 +0200 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) X-Mailer: Apple Mail (2.3124) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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.0 (----) 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 (+) Hi Friends! > $ cat configure.ac > AC_INIT([foo], [1.0]) > AM_INIT_AUTOMAKE([1.15 foreign]) > AM_PATH_PYTHON > AC_OUTPUT([Makefile]) > $ cat Makefile.am > noinst_PYTHON =3D foo.py > python_PYTHON =3D bar.py > $ autoreconf -fi > $ grep am__pep3147_tweak Makefile.in > py_files_pep3147=3D`echo "$$py_files" | $(am__pep3147_tweak)`; = \ > $ Now, if I remove the noinst, am__pep3147_tweak is properly defined. > $ cat Makefile.am > python_PYTHON =3D bar.py > $ autoreconf -fi > $ grep am__pep3147_tweak Makefile.in > am__pep3147_tweak =3D \ > py_files_pep3147=3D`echo "$$py_files" | $(am__pep3147_tweak)`; = \ > $ At runtime, it results in: > $ make uninstall-nodist_vcsn_tools_pythonPYTHON > make: Entering directory `_build/36s' > /bin/sh: command substitution: line 7: syntax error: unexpected end of = file >=20 > ( cd '/opt/gostai/lib/python3.5/site-packages/vcsn_tools' && rm -f = config.py ) > ( cd '/opt/gostai/lib/python3.5/site-packages/vcsn_tools' && rm -f = config.pyc ) > ( cd '/opt/gostai/lib/python3.5/site-packages/vcsn_tools' && rm -f = config.pyo ) > ( cd '/opt/gostai/lib/python3.5/site-packages/vcsn_tools' && rm -f c = ) > ( cd '/opt/gostai/lib/python3.5/site-packages/vcsn_tools' && rm -f o = ) > Compilation finished: /Users/akim/src/lrde/2: build-for-darwin -j3 = uninstall-nodist_vcsn_tools_pythonPYTHON That=E2=80=99s Automake 1.15. Of course the `c` and `o` are errors, = resulting from the missing definition of am__pep3147_tweak (as is the unexpected end of file). Sure, I can use noinst_SCRIPTS etc., but it was handy for me to have a variable for all my Python build-scripts. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 20 14:56:00 2022 Received: (at control) by debbugs.gnu.org; 20 Feb 2022 19:56:00 +0000 Received: from localhost ([127.0.0.1]:33908 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLsJM-0002SH-JL for submit@debbugs.gnu.org; Sun, 20 Feb 2022 14:56:00 -0500 Received: from woodpecker.gentoo.org ([140.211.166.183]:47708 helo=smtp.gentoo.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLsJL-0002S4-Kf for control@debbugs.gnu.org; Sun, 20 Feb 2022 14:55:59 -0500 Received: by smtp.gentoo.org (Postfix, from userid 559) id E9EDC343976; Sun, 20 Feb 2022 19:55:53 +0000 (UTC) From: Mike Frysinger To: control@debbugs.gnu.org Subject: Control message Message-Id: <20220220195553.E9EDC343976@smtp.gentoo.org> Date: Sun, 20 Feb 2022 19:55:53 +0000 (UTC) X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control 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: -6.0 (------) tag 24507 = confirmed thankyou From unknown Sat Aug 16 16:55:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24507: [PATCH] noinst_PYTHON breaks uninstall of Python files References: In-Reply-To: Resent-From: Bogdan Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Wed, 22 Mar 2023 16:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24507 X-GNU-PR-Package: automake X-GNU-PR-Keywords: confirmed To: automake-patches@gnu.org, 24507@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167950421012090 (code B ref -1); Wed, 22 Mar 2023 16:57:02 +0000 Received: (at submit) by debbugs.gnu.org; 22 Mar 2023 16:56:50 +0000 Received: from localhost ([127.0.0.1]:36475 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pf1lZ-00038t-OR for submit@debbugs.gnu.org; Wed, 22 Mar 2023 12:56:50 -0400 Received: from lists.gnu.org ([209.51.188.17]:41778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pf1lY-00038m-0f for submit@debbugs.gnu.org; Wed, 22 Mar 2023 12:56:48 -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 ) id 1pf1lX-0005Di-Pe for automake-patches@gnu.org; Wed, 22 Mar 2023 12:56:47 -0400 Received: from mout.gmx.net ([212.227.15.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pf1lV-00045j-Nm for automake-patches@gnu.org; Wed, 22 Mar 2023 12:56:47 -0400 Received: from [192.168.1.226] ([90.227.12.124]) by mail.gmx.net (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1Mkpav-1qLDHb2Ywh-00mHr3; Wed, 22 Mar 2023 17:56:32 +0100 Content-Type: multipart/mixed; boundary="------------nUMsnX76fU4gntZK1QnC0hqF" Message-ID: <021f4a79-9bc5-b11b-6827-29ed3fc2af67@gmx.us> Date: Wed, 22 Mar 2023 17:56:28 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Content-Language: en-GB, sv-SE, pl From: Bogdan X-Provags-ID: V03:K1:f0eQBHZOufqq7z6jgmN0/iFKMe+beeQ0qNIt/ASy1iNaQKT/uEb j9RTL622fnWoQ1nZQCW3Xcyy+LJy1n6A/V8QjyH87uK5NNhXgRMP6vKQdv5XlwzpkKMyLdj FAeZNfrCP14pOMuhhp49dd3jDL3wpJA/6sBcAikk6lLzug8nTgtq/lDWw/s+UgvS9EgOKB4 eggra6e9A8OCCS6ILMz6Q== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:ZeDIMHmJiFw=;m7eUhzyrxkQkVaFuRjppC4mVAYl hiVQmijq4iqCIO+ENxry4FcJFUmax8mIkAEDcNi8IWDxjIUkUKPOb1f13nk5f9jWMp73kNZI6 708NfnvqhW/upvasEuIhUUmO+J8NxsuMpG8lWKotR1o39yPjhievFt5ljq3/BT5O9FrFm2tIR FR8A+RVkCZnMrVSIZq3IHA9v/4f0YGX6IR2XzfSHs7zxGa1Mt9lLSU3BPkf+w4qfYSLNH5xaj LkQDfh1/ZdaM2t2jW90VECJ/OeRp9ihEQDG3qSWxvCyVKV5jk89KeUawUu3qlBIRDq1Lael0z 1ahq6zo6b3qd6r9PNwkCkOxDCGHCfEC/SJN8U7xjPSZZu7cHs2WyWON5BcX5scGsL4HnjDF/T TkS0mk6/ioMb4sDW8hLQ9f9vcFOU91CITk+KQzFNYs6/GQKQNcVSeTVJnWf/FZ5OttZLltozN DuGWBIJBnlyhF6K9By9apgC0Q8gQWv0tFT87DyMxg/qgiT0GMIeEgt5heR/t/K1x0Zar44qtj m3Z6Qs0pEIZh3MpYVMnzy065H8tnDc0ob2K+cysFT3GUGxIcGI/0/MvwfHObyXx0nwXE6i53I EGghfOyzH9MRYHz6Q+ioRAwFXQlwhmh3k3ZDwqTl04VtqJPHCeu/tQgtSoj7YtVudNlr5iC2d zBHWkNyWMG+d7OKrRhCon4vJh+6YqJJAeCiVZU387gD5s3ckFRhBKXBcP+G3af9GisxypdFqP 9F5m8jhVsJW+Vv5sI7Ye19bdQcnJzHhjaZlQhjheJOakN8gXR9b6bH69i2Wu1n5N4bTWHoBtw TciUWmv9NQjAiFMYKPQy6VZVnyYfRGn6QPNO4a1WDSeD9NOUJRdwFBucWFdBLA+MpxvjnBFdT BAm4U7YWgzn8EHP4Becvm0B9eic018cXHu72BuxL79hXA4xr3+JLQ6oaSyeQZjZs1YZhG6cRb a1x8ew30wmzxVsPxoq31Pcafw4M= Received-SPF: pass client-ip=212.227.15.19; envelope-from=bogdro_rep@gmx.us; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) 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: -2.4 (--) This is a multi-part message in MIME format. --------------nUMsnX76fU4gntZK1QnC0hqF Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, Automakers. The attached patch fixes bug#24507. I don't fully understand the cause, but I guess that the "if %?INSTALL%" block gets ignored when "noinst" is present, including the "?FIRST?" it contains, which defines the missing "am__pep3147_tweak". Anyway, moving the "?FIRST?" block with the declaration of "am__pep3147_tweak" outside the "if %?INSTALL%" block fixes the issue. All tests with "py" in the name pass. This isn't the first time either. The test I've updated was for a similar case - bug#10995 ("am__py_compile doesn't get correctly defined when there a 'noinst_PYTHON' declaration precedes a 'foo_PYTHON' declaration"), that's probably why "am__py_compile" is in its own "?FIRST?" block at the top now. No other language XX.am files seem to have "?FIRST?" inside an "if" block. -- Regards - Bogdan ('bogdro') D. (GNU/Linux & FreeDOS) X86 assembly (DOS, GNU/Linux): http://bogdro.evai.pl/index-en.php Soft(EN): http://bogdro.evai.pl/soft http://bogdro.evai.pl/soft4asm www.Xiph.org www.TorProject.org www.LibreOffice.org www.GnuPG.org --------------nUMsnX76fU4gntZK1QnC0hqF Content-Type: text/x-patch; charset=UTF-8; name="automake-fix-py-uninst-mail.diff" Content-Disposition: attachment; filename="automake-fix-py-uninst-mail.diff" Content-Transfer-Encoding: base64 RnJvbSBiZjBhNjBhNjFjMTQxMzE4NWE5ODI4OTBiMzAwNDZmNDZjZjljZDFkIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBCb2dkYW4gRHJvemRvd3NraSA8PgpEYXRlOiBXZWQs IDIyIE1hciAyMDIzIDE3OjEwOjU4ICswMTAwClN1YmplY3Q6IFtQQVRDSF0gRml4IFB5dGhv biB0d2VhayBtaXNzaW5nIHdoZW4gbm9pbnN0IGlzIHByZXNlbnQKCi0tLQogbGliL2FtL3B5 dGhvbi5hbSAgICB8IDQgKystLQogdC9weXRob24tcHIxMDk5NS5zaCB8IDYgKysrKysrCiAy IGZpbGVzIGNoYW5nZWQsIDggaW5zZXJ0aW9ucygrKSwgMiBkZWxldGlvbnMoLSkKCmRpZmYg LS1naXQgYS9saWIvYW0vcHl0aG9uLmFtIGIvbGliL2FtL3B5dGhvbi5hbQppbmRleCA5OGY5 NWFmMWIuLjE5ZjI2OGVmYyAxMDA2NDQKLS0tIGEvbGliL2FtL3B5dGhvbi5hbQorKysgYi9s aWIvYW0vcHl0aG9uLmFtCkBAIC05NCwxMSArOTQsMTEgQEAgZW5kaWYgJT9JTlNUQUxMJQog IyMgVW5pbnN0YWxsaW5nLiAgIyMKICMjIC0tLS0tLS0tLS0tLS0tICMjCiAKLWlmICU/SU5T VEFMTCUKLQogP0ZJUlNUP2FtX19wZXAzMTQ3X3R3ZWFrID0gXAogP0ZJUlNUPyAgc2VkIC1l ICdzfFwucHkkJHx8JyAtZSAnc3xbXi9dKiQkfF9fcHljYWNoZV9fLyYuKi5weWMgX19weWNh Y2hlX18vJi4qLnB5b3wnCiAKK2lmICU/SU5TVEFMTCUKKwogLlBIT05ZIHVuaW5zdGFsbC1h bTogdW5pbnN0YWxsLSVESVIlUFlUSE9OCiB1bmluc3RhbGwtJURJUiVQWVRIT046CiAJQCQo Tk9STUFMX1VOSU5TVEFMTCkKZGlmZiAtLWdpdCBhL3QvcHl0aG9uLXByMTA5OTUuc2ggYi90 L3B5dGhvbi1wcjEwOTk1LnNoCmluZGV4IDMyNGJlOTE2ZS4uYWJlYjhhMTI0IDEwMDY0NAot LS0gYS90L3B5dGhvbi1wcjEwOTk1LnNoCisrKyBiL3QvcHl0aG9uLXByMTA5OTUuc2gKQEAg LTE3LDYgKzE3LDkgQEAKICMgVGVzdCBhdXRvbWFrZSBidWcjMTA5OTU6IGFtX19weV9jb21w aWxlIGRvZXNuJ3QgZ2V0IGNvcnJlY3RseSBkZWZpbmVkCiAjIHdoZW4gdGhlcmUgYSAnbm9p bnN0X1BZVEhPTicgZGVjbGFyYXRpb24gcHJlY2VkZXMgYSAnZm9vX1BZVEhPTicKICMgZGVj bGFyYXRpb24uCisjIFRlc3QgYWxzbyBhdXRvbWFrZSBidWcjMjQ1MDc6IGFtX19wZXAzMTQ3 X3R3ZWFrIGRvZXNuJ3QgZ2V0IGNvcnJlY3RseQorIyBkZWZpbmVkIHdoZW4gdGhlcmUgYSAn bm9pbnN0X1BZVEhPTicgZGVjbGFyYXRpb24gcHJlY2VkZXMgYSAnZm9vX1BZVEhPTicKKyMg ZGVjbGFyYXRpb24gYW5kICdtYWtlIHVuaW5zdGFsbCcgZmFpbHMgZnVuY3Rpb25hbGx5IChq dXN0IHNob3dzIGVycm9ycykuCiAKIHJlcXVpcmVkPXB5dGhvbgogLiB0ZXN0LWluaXQuc2gK QEAgLTUzLDQgKzU2LDcgQEAgcHlfaW5zdGFsbGVkIC0tbm90IGluc3QvcHkvbm8ucHljCiAK ICRNQUtFIGRpc3R0ZXN0CiAKK0xDX0FMTD1DIHJ1bl9tYWtlIC1NIHVuaW5zdGFsbAorZ3Jl cCAnY29tbWFuZCBzdWJzdGl0dXRpb24nIG91dHB1dCAmJiBleGl0IDEKKwogOgotLSAKMi4z NS4xCgo= --------------nUMsnX76fU4gntZK1QnC0hqF-- From unknown Sat Aug 16 16:55:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24507: noinst_PYTHON breaks uninstall of Python files References: Resent-From: Karl Berry Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Wed, 05 Jul 2023 16:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24507 X-GNU-PR-Package: automake X-GNU-PR-Keywords: confirmed To: akim.demaille@gmail.com, bogdro_rep@gmx.us Cc: 24507@debbugs.gnu.org Received: via spool by 24507-submit@debbugs.gnu.org id=B24507.16885728329037 (code B ref 24507); Wed, 05 Jul 2023 16:01:02 +0000 Received: (at 24507) by debbugs.gnu.org; 5 Jul 2023 16:00:32 +0000 Received: from localhost ([127.0.0.1]:38851 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qH4vf-0002Lc-DL for submit@debbugs.gnu.org; Wed, 05 Jul 2023 12:00:31 -0400 Received: from frenzy.freefriends.org ([198.99.81.75]:36100 helo=freefriends.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qH4vc-0002LN-6Q; Wed, 05 Jul 2023 12:00:29 -0400 X-Envelope-From: karl@freefriends.org Received: from freefriends.org (localhost [127.0.0.1]) by freefriends.org (8.14.7/8.14.7) with ESMTP id 365G0Rof028218 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 5 Jul 2023 10:00:27 -0600 Received: (from apache@localhost) by freefriends.org (8.14.7/8.14.7/Submit) id 365G0QpG028217; Wed, 5 Jul 2023 10:00:26 -0600 Date: Wed, 5 Jul 2023 10:00:26 -0600 Message-Id: <202307051600.365G0QpG028217@freefriends.org> From: Karl Berry In-Reply-To: X-Spam-Score: -0.0 (/) 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 (-) Hi Akim (hope all is well with you) and all, Back on your report https://bugs.gnu.org/24507 from a mere seven years ago ... > $ cat Makefile.am > noinst_PYTHON = foo.py > python_PYTHON = bar.py ... > $ make uninstall-nodist_vcsn_tools_pythonPYTHON > make: Entering directory `_build/36s' > /bin/sh: command substitution: line 7: syntax error: unexpected end of file Bogdan's patch (below) worked for me too, while not breaking any other existing test, so I installed it. bd> I don't fully understand the cause, Me either. but I guess that the "if %?INSTALL%" block gets ignored when "noinst" is present, I guess so. Just based on the names. If there is any real explanation of those weird %?FOO% and ?FOO? conditionals, I haven't found it. including the "?FIRST?" it contains, which defines the missing "am__pep3147_tweak". Thank you very much for analyzing it and finding the patch. Closing. --karl 2023-07-01 Bogdan python: support noinst_PYTHON preceding foo_PYTHON. This change fixes https://bugs.gnu.org/24507. * lib/am/python.am (am__pep3147_tweak): remove conditional on %?INSTALL%. * t/python-pr10995.sh: test with make uninstall. diff --git a/lib/am/python.am b/lib/am/python.am index 98f95af1b..19f268efc 100644 --- a/lib/am/python.am +++ b/lib/am/python.am @@ -94,11 +94,11 @@ endif %?INSTALL% ## Uninstalling. ## ## -------------- ## -if %?INSTALL% - ?FIRST?am__pep3147_tweak = \ ?FIRST? sed -e 's|\.py$$||' -e 's|[^/]*$$|__pycache__/&.*.pyc __pycache__/&.*.pyo|' +if %?INSTALL% + .PHONY uninstall-am: uninstall-%DIR%PYTHON uninstall-%DIR%PYTHON: @$(NORMAL_UNINSTALL) diff --git a/t/python-pr10995.sh b/t/python-pr10995.sh index 324be916e..abeb8a124 100644 --- a/t/python-pr10995.sh +++ b/t/python-pr10995.sh @@ -17,6 +17,9 @@ # Test automake bug#10995: am__py_compile doesn't get correctly defined # when there a 'noinst_PYTHON' declaration precedes a 'foo_PYTHON' # declaration. +# Test also automake bug#24507: am__pep3147_tweak doesn't get correctly +# defined when there a 'noinst_PYTHON' declaration precedes a 'foo_PYTHON' +# declaration and 'make uninstall' fails functionally (just shows errors). required=python . test-init.sh @@ -53,4 +56,7 @@ py_installed --not inst/py/no.pyc $MAKE disttest +LC_ALL=C run_make -M uninstall +grep 'command substitution' output && exit 1 + : compile finished at Wed Jul 5 08:59:29 2023 From unknown Sat Aug 16 16:55:14 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Akim Demaille Subject: bug#24507: closed (Re: bug#24507: noinst_PYTHON breaks uninstall of Python files) Message-ID: References: <202307051600.365G0QpG028217@freefriends.org> X-Gnu-PR-Message: they-closed 24507 X-Gnu-PR-Package: automake X-Gnu-PR-Keywords: confirmed Reply-To: 24507@debbugs.gnu.org Date: Wed, 05 Jul 2023 16:01:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1688572862-9091-1" This is a multi-part message in MIME format... ------------=_1688572862-9091-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #24507: noinst_PYTHON breaks uninstall of Python files which was filed against the automake package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 24507@debbugs.gnu.org. --=20 24507: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D24507 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1688572862-9091-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 24507-done) by debbugs.gnu.org; 5 Jul 2023 16:00:31 +0000 Received: from localhost ([127.0.0.1]:38849 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qH4ve-0002LZ-UH for submit@debbugs.gnu.org; Wed, 05 Jul 2023 12:00:31 -0400 Received: from frenzy.freefriends.org ([198.99.81.75]:36100 helo=freefriends.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qH4vc-0002LN-6Q; Wed, 05 Jul 2023 12:00:29 -0400 X-Envelope-From: karl@freefriends.org Received: from freefriends.org (localhost [127.0.0.1]) by freefriends.org (8.14.7/8.14.7) with ESMTP id 365G0Rof028218 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 5 Jul 2023 10:00:27 -0600 Received: (from apache@localhost) by freefriends.org (8.14.7/8.14.7/Submit) id 365G0QpG028217; Wed, 5 Jul 2023 10:00:26 -0600 Date: Wed, 5 Jul 2023 10:00:26 -0600 Message-Id: <202307051600.365G0QpG028217@freefriends.org> From: Karl Berry To: akim.demaille@gmail.com, bogdro_rep@gmx.us Subject: Re: bug#24507: noinst_PYTHON breaks uninstall of Python files In-Reply-To: X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 24507-done Cc: 24507@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 (-) Hi Akim (hope all is well with you) and all, Back on your report https://bugs.gnu.org/24507 from a mere seven years ago ... > $ cat Makefile.am > noinst_PYTHON = foo.py > python_PYTHON = bar.py ... > $ make uninstall-nodist_vcsn_tools_pythonPYTHON > make: Entering directory `_build/36s' > /bin/sh: command substitution: line 7: syntax error: unexpected end of file Bogdan's patch (below) worked for me too, while not breaking any other existing test, so I installed it. bd> I don't fully understand the cause, Me either. but I guess that the "if %?INSTALL%" block gets ignored when "noinst" is present, I guess so. Just based on the names. If there is any real explanation of those weird %?FOO% and ?FOO? conditionals, I haven't found it. including the "?FIRST?" it contains, which defines the missing "am__pep3147_tweak". Thank you very much for analyzing it and finding the patch. Closing. --karl 2023-07-01 Bogdan python: support noinst_PYTHON preceding foo_PYTHON. This change fixes https://bugs.gnu.org/24507. * lib/am/python.am (am__pep3147_tweak): remove conditional on %?INSTALL%. * t/python-pr10995.sh: test with make uninstall. diff --git a/lib/am/python.am b/lib/am/python.am index 98f95af1b..19f268efc 100644 --- a/lib/am/python.am +++ b/lib/am/python.am @@ -94,11 +94,11 @@ endif %?INSTALL% ## Uninstalling. ## ## -------------- ## -if %?INSTALL% - ?FIRST?am__pep3147_tweak = \ ?FIRST? sed -e 's|\.py$$||' -e 's|[^/]*$$|__pycache__/&.*.pyc __pycache__/&.*.pyo|' +if %?INSTALL% + .PHONY uninstall-am: uninstall-%DIR%PYTHON uninstall-%DIR%PYTHON: @$(NORMAL_UNINSTALL) diff --git a/t/python-pr10995.sh b/t/python-pr10995.sh index 324be916e..abeb8a124 100644 --- a/t/python-pr10995.sh +++ b/t/python-pr10995.sh @@ -17,6 +17,9 @@ # Test automake bug#10995: am__py_compile doesn't get correctly defined # when there a 'noinst_PYTHON' declaration precedes a 'foo_PYTHON' # declaration. +# Test also automake bug#24507: am__pep3147_tweak doesn't get correctly +# defined when there a 'noinst_PYTHON' declaration precedes a 'foo_PYTHON' +# declaration and 'make uninstall' fails functionally (just shows errors). required=python . test-init.sh @@ -53,4 +56,7 @@ py_installed --not inst/py/no.pyc $MAKE disttest +LC_ALL=C run_make -M uninstall +grep 'command substitution' output && exit 1 + : compile finished at Wed Jul 5 08:59:29 2023 ------------=_1688572862-9091-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 22 Sep 2016 09:48:28 +0000 Received: from localhost ([127.0.0.1]:60213 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bn0cA-0000TK-TG for submit@debbugs.gnu.org; Thu, 22 Sep 2016 05:48:28 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52651) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bn0c9-0000T8-AP for submit@debbugs.gnu.org; Thu, 22 Sep 2016 05:48:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bn0c2-0007CL-UM for submit@debbugs.gnu.org; Thu, 22 Sep 2016 05:48:15 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:37119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bn0c2-0007CH-Rh for submit@debbugs.gnu.org; Thu, 22 Sep 2016 05:48:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bn0c1-0000kC-GY for bug-automake@gnu.org; Thu, 22 Sep 2016 05:48:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bn0bx-00078t-CN for bug-automake@gnu.org; Thu, 22 Sep 2016 05:48:12 -0400 Received: from smtp.lrde.epita.fr ([163.5.55.2]:48577 helo=kaboul.lrde.epita.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bn0bx-00075N-50 for bug-automake@gnu.org; Thu, 22 Sep 2016 05:48:09 -0400 Received: from erebus.lrde.epita.fr (erebus.lrde.epita.fr [192.168.101.165]) by kaboul.lrde.epita.fr (Postfix) with ESMTPSA id 4A5BF48C79 for ; Thu, 22 Sep 2016 11:48:00 +0200 (CEST) From: Akim Demaille Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: noinst_PYTHON breaks uninstall of Python files Message-Id: Date: Thu, 22 Sep 2016 11:48:00 +0200 To: Automake Bugs Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) X-Mailer: Apple Mail (2.3124) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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.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: 1.0 (+) Hi Friends! > $ cat configure.ac > AC_INIT([foo], [1.0]) > AM_INIT_AUTOMAKE([1.15 foreign]) > AM_PATH_PYTHON > AC_OUTPUT([Makefile]) > $ cat Makefile.am > noinst_PYTHON =3D foo.py > python_PYTHON =3D bar.py > $ autoreconf -fi > $ grep am__pep3147_tweak Makefile.in > py_files_pep3147=3D`echo "$$py_files" | $(am__pep3147_tweak)`; = \ > $ Now, if I remove the noinst, am__pep3147_tweak is properly defined. > $ cat Makefile.am > python_PYTHON =3D bar.py > $ autoreconf -fi > $ grep am__pep3147_tweak Makefile.in > am__pep3147_tweak =3D \ > py_files_pep3147=3D`echo "$$py_files" | $(am__pep3147_tweak)`; = \ > $ At runtime, it results in: > $ make uninstall-nodist_vcsn_tools_pythonPYTHON > make: Entering directory `_build/36s' > /bin/sh: command substitution: line 7: syntax error: unexpected end of = file >=20 > ( cd '/opt/gostai/lib/python3.5/site-packages/vcsn_tools' && rm -f = config.py ) > ( cd '/opt/gostai/lib/python3.5/site-packages/vcsn_tools' && rm -f = config.pyc ) > ( cd '/opt/gostai/lib/python3.5/site-packages/vcsn_tools' && rm -f = config.pyo ) > ( cd '/opt/gostai/lib/python3.5/site-packages/vcsn_tools' && rm -f c = ) > ( cd '/opt/gostai/lib/python3.5/site-packages/vcsn_tools' && rm -f o = ) > Compilation finished: /Users/akim/src/lrde/2: build-for-darwin -j3 = uninstall-nodist_vcsn_tools_pythonPYTHON That=E2=80=99s Automake 1.15. Of course the `c` and `o` are errors, = resulting from the missing definition of am__pep3147_tweak (as is the unexpected end of file). Sure, I can use noinst_SCRIPTS etc., but it was handy for me to have a variable for all my Python build-scripts. ------------=_1688572862-9091-1--