py-mod.mk: Add support to # extract variables

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2024-12-03 12:27:39 +00:00
commit 4e405a5d1a

View file

@ -4,7 +4,7 @@ include $(JWBDIR)/make/dirs.mk
include $(JWBDIR)/make/dev-utils.mk
PY_INIT_TMPL = $(wildcard __init__.py.tmpl)
PY_SED_EXTRACT_EXPORT ?= /\(class\|def\) ..*\# *export/ !d; s/\(async\)* *\(class\|def\) *//; s/[(:].*//
PY_SED_EXTRACT_EXPORT ?= /\(\(class\|def\) .\+\|^ *\S\+\s*=.*\)\# *export/ !d; s/\(async\)* *\(class\|def\) *//; s/[(:=].*//
#leftparen := (
#PY_EXPORT ?= $(shell sed '/\(class\|def\) ..*\# *export/ !d; s/\(class\|def\) *//; s/[$(leftparen):].*//' $(PY_SRC_PY))