From 5a481430645b889ee6a0d2d7616241603c300bc2 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Tue, 17 Mar 2026 13:43:07 +0100 Subject: [PATCH] py-defs.mk: Move boolean vars to top Move the PY_XXX = true|false variable definitions meant to be preset by including makefiles to the top of py-defs.mk to make the structure of the file clearer. Signed-off-by: Jan Lindemann --- make/py-defs.mk | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/make/py-defs.mk b/make/py-defs.mk index 5772cc52..3161af36 100644 --- a/make/py-defs.mk +++ b/make/py-defs.mk @@ -1,5 +1,18 @@ include $(JWBDIR)/make/py-version.mk +PY_INSTALL_INIT_PY ?= true +PY_UPDATE_INIT_PY ?= true +PY_INSTALL ?= true +PY_INSTALL_REG ?= true + +ifneq ($(PY_INSTALL),true) + PY_INSTALL_REG = false +endif +PY_INSTALL_PYC ?= true +ifneq ($(PY_INSTALL_REG),true) + PY_INSTALL_PYC = false +endif + ifeq ($(DEVELOPMENT),true) PY_SITE_PACKAGES_PATH := $(PREFIX)/python$(PYTHON_VERSION)/site-packages else @@ -22,8 +35,6 @@ ifneq ($(PY_INSTALL_DIR),) PY_INSTALL_DIR_PY ?= $(PY_INSTALL_DIR) endif -PY_INSTALL_INIT_PY ?= true - # deduce PY_INSTALL_DIR_PY from working directory below .. python/ ifeq ($(PY_INSTALL_DIR_PY),) PY_INSTALL_PKG_MOD ?= $(shell $(ECHO) $(CWD) | $(SED) 's%.*/python/%%; s%/.*%%') @@ -50,17 +61,6 @@ else PY_INSTALL_DIR_PYC ?= $(PY_INSTALL_DIR_PY) endif -PY_UPDATE_INIT_PY ?= true -PY_INSTALL ?= true -PY_INSTALL_REG ?= true -ifneq ($(PY_INSTALL),true) - PY_INSTALL_REG = false -endif -PY_INSTALL_PYC ?= true -ifneq ($(PY_INSTALL_REG),true) - PY_INSTALL_PYC = false -endif - PY_INSTALL_DIRS ?= $(sort $(PY_INSTALL_DIR_PY) $(PY_INSTALL_DIR_PYC)) PY_INSTALLED_PY = $(addprefix $(PY_INSTALL_DIR_PY)/,$(sort $(PY_ALL_PY))) ifeq ($(PY_INSTALL_PYC),true)