]> Nishi Git Mirror - gwion.git/commitdiff
:bug: embed needs depends
authorfennecdjay <fennecdjay@gmail.com>
Tue, 14 Mar 2023 08:07:01 +0000 (09:07 +0100)
committerfennecdjay <fennecdjay@gmail.com>
Tue, 14 Mar 2023 08:07:01 +0000 (09:07 +0100)
scripts/embed.bash

index 6d5f1122ade04fc23b15d508bdd112346171831c..e744543a20102c488cfa4c437e12c93516b90db4 100644 (file)
@@ -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);
 }