]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
python: support noinst_PYTHON preceding foo_PYTHON.
authorBogdan <bogdro_rep@gmx.us>
Wed, 5 Jul 2023 15:59:29 +0000 (08:59 -0700)
committerKarl Berry <karl@freefriends.org>
Wed, 5 Jul 2023 15:59:29 +0000 (08:59 -0700)
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.

lib/am/python.am
t/python-pr10995.sh

index 98f95af1b4f28d527a241988c14844cdc0b9c212..19f268efc4b8aa6d7b8853ea3d757148c399dc1c 100644 (file)
@@ -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)
index 324be916e6dc580d59cd4d01abd95ef6c6f2443d..abeb8a12446868fc5fdf14d63d71d9c3abd918e4 100644 (file)
@@ -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
+
 :