interpreters/lua: support lua module list register

Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
This commit is contained in:
Xu Xingliang 2022-12-02 16:28:02 +08:00 committed by Xiang Xiao
parent 311b4210b7
commit 167672c783

View File

@ -30,7 +30,8 @@ endef
ifneq ($(LUAMODNAME),)
LUAMODLIST := $(addprefix $(LUAMOD_REGISTRY)$(DELIM),$(addsuffix .bdat,$(LUAMODNAME)))
$(LUAMODLIST): $(DEPCONFIG) Makefile
$(call LUAMOD_REGISTER,$(LUAMODNAME),luaopen_$(LUAMODNAME))
$(call LUAMOD_REGISTER,$(firstword $(LUAMODNAME)),$(firstword luaopen_$(LUAMODNAME)))
$(eval LUAMODNAME=$(filter-out $(firstword $(LUAMODNAME)),$(LUAMODNAME)))
register:: $(LUAMODLIST)
endif