Skip to content

Commit

Permalink
🐛 embed needs depends
Browse files Browse the repository at this point in the history
  • Loading branch information
fennecdjay committed Mar 14, 2023
1 parent 18e9473 commit ebbc589
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/embed.bash
Expand Up @@ -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);
}
Expand Down

0 comments on commit ebbc589

Please sign in to comment.