bif files declared with bif_target() are now automatically compiled

in.

No more manual includes to pull them in.

(It doesn't quite work fully automatically yet for some bifs that need
script-level types defined, like the input and logging frameworks.
They still do a manual "@load foo.bif" in their main.bro to get the
order right. It's a bit tricky to fix that and would probably need
splitting main.bro into two parts; not sure that's worth it.)
This commit is contained in:
Robin Sommer 2013-07-25 09:45:10 -07:00
parent febb7e8395
commit 4a7046848c
11 changed files with 42 additions and 10 deletions

View file

@ -560,6 +560,8 @@ void builtin_error(const char* msg, BroObj* arg)
#include "reporter.bif.func_def"
#include "strings.bif.func_def"
#include "__all__.bif.cc" // Autogenerated for compiling in the bif_target() code.
void init_builtin_funcs()
{
bro_resources = internal_type("bro_resources")->AsRecordType();
@ -574,6 +576,8 @@ void init_builtin_funcs()
#include "reporter.bif.func_init"
#include "strings.bif.func_init"
#include "__all__.bif.init.cc" // Autogenerated for compiling in the bif_target() code.
did_builtin_init = true;
}