py-defs.mk: Allow inclusion without defs.mk

py-defs.mk uses the variables ECHO and SED defined in defs.mk. The
complexity this introduces doesn't justify the reduced redundancy,
though, so this commit defines them redundantly in py-defs.mk and to
allow inclusion without prior defs.mk.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-07-11 12:36:23 +02:00
commit 150866015a
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61

View file

@ -37,6 +37,8 @@ endif
# deduce PY_INSTALL_DIR_PY from working directory below .. python/
ifeq ($(PY_INSTALL_DIR_PY),)
ECHO ?= echo
SED ?= sed
PY_INSTALL_PKG_MOD ?= $(shell $(ECHO) $(CWD) | $(SED) 's%.*/python/%%; s%/.*%%')
PY_INSTALL_SUB_MOD ?= $(shell $(ECHO) $(CWD) | $(SED) "s%.*/$(PY_INSTALL_PKG_MOD)\(/\|$$\)%%")
ifneq ($(PY_INSTALL_SUB_MOD),)