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.
## 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)
# 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
$MAKE disttest
+LC_ALL=C run_make -M uninstall
+grep 'command substitution' output && exit 1
+
: