aboutsummaryrefslogtreecommitdiffstats
path: root/include/prereq.mk
diff options
context:
space:
mode:
Diffstat (limited to 'include/prereq.mk')
-rw-r--r--include/prereq.mk12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/prereq.mk b/include/prereq.mk
index 0f0f253744..60f1e47c3d 100644
--- a/include/prereq.mk
+++ b/include/prereq.mk
@@ -66,6 +66,18 @@ define RequireHeader
$$(eval $$(call Require,$(1),$(2)))
endef
+define CleanupPython3
+ define Require/python3-cleanup
+ if [ -f "$(STAGING_DIR_HOST)/bin/python" ] && \
+ $(STAGING_DIR_HOST)/bin/python -V 2>&1 | \
+ grep -q 'Python 3'; then \
+ rm $(STAGING_DIR_HOST)/bin/python; \
+ fi
+ endef
+
+ $$(eval $$(call Require,python3-cleanup))
+endef
+
define QuoteHostCommand
'$(subst ','"'"',$(strip $(1)))'
endef