From 6ce4667dd449551d667d3a72cc19c640fe3cf17d Mon Sep 17 00:00:00 2001
From: Aurelien Larcher <aurelien.larcher@gmail.com>
Date: Sun, 10 Jan 2021 23:31:56 +0100
Subject: [PATCH] ips.mk: generate macros to select or ignore lines in python manifests

---
 make-rules/ips.mk |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/make-rules/ips.mk b/make-rules/ips.mk
index 3a15ee8..8837b32 100644
--- a/make-rules/ips.mk
+++ b/make-rules/ips.mk
@@ -128,8 +128,12 @@
 PKG_OPTIONS +=		$(PKG_MACROS:%=-D %) \
 					-D COMPONENT_CLASSIFICATION="org.opensolaris.category.2008:$(strip $(COMPONENT_CLASSIFICATION))"
 
-PKG_MACROS +=           PYTHON_2.7_ONLY=\#
-PKG_MACROS +=           PYTHON_3.5_ONLY=\#
+define python-generate-macros
+PKG_MACROS +=           PYTHON_$(1)_ONLY=\#
+PKG_MACROS +=           PYTHON_$(1)_EXCL=
+endef
+$(foreach ver,$(PYTHON_VERSIONS),$(eval $(call python-generate-macros,$(ver))))
+
 PKG_MACROS +=           PYTHON_32_ONLY=
 
 MANGLED_DIR =	$(PROTO_DIR)/mangled
@@ -296,7 +300,7 @@
 # Define and execute a macro that generates a rule to create a manifest for a
 # python module specific to a particular version of the python runtime.
 define python-manifest-rule
-$(MANIFEST_BASE)-%-$(2).mogrified: PKG_MACROS += PYTHON_$(1)_ONLY=
+$(MANIFEST_BASE)-%-$(2).mogrified: PKG_MACROS += PYTHON_$(1)_ONLY= PYTHON_$(1)_EXCL=\#
 
 ifneq ($(filter $(1),$(PYTHON_64_ONLY_VERSIONS)),)
 $(MANIFEST_BASE)-%-$(2).mogrified: PKG_MACROS += PYTHON_32_ONLY=\#

--
Gitblit v1.9.3