From ebbc589d66298975b3c05771ef8bf5e87f70d595 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Tue, 14 Mar 2023 09:07:01 +0100 Subject: [PATCH] :bug: embed needs depends --- scripts/embed.bash | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/embed.bash b/scripts/embed.bash index 6d5f1122..e744543a 100644 --- a/scripts/embed.bash +++ b/scripts/embed.bash @@ -55,11 +55,18 @@ modend() { } } +depend() { + has_func "gwdepend" "$1" "$2" && { + header "extern m_str* gwdepend_${2}(void);" + echo " plug->depend = gwdepend_${2};" + } +} + handle_lib() { cat << EOF >> embed/embed_body ANN static void embed_${name}(const Gwion gwion) { Plug plug = new_plug(gwion->mp); -$(modini "$1" "$2")$(modend "$1" "$2")$(plugin "$1" "$2")$(driver "$1" "$2") +$(modini "$1" "$2")$(modend "$1" "$2")$(plugin "$1" "$2")$(driver "$1" "$2")$(depend "$1" "$2") map_set(&gwion->data->plugs->map, (vtype)strdup("${2}"), (vtype)plug); } -- 2.43.0