mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
bro scripts generated from bifs now install to $prefix/share/bro/base/
Addresses #545
This commit is contained in:
parent
ac257c7a6d
commit
7b07a19cd6
3 changed files with 15 additions and 8 deletions
|
@ -149,7 +149,7 @@ export {
|
|||
# We keep a script-level copy of all filters so that we can manipulate them.
|
||||
global filters: table[ID, string] of Filter;
|
||||
|
||||
@load logging.bif.bro # Needs Filter and Stream defined.
|
||||
@load base/logging.bif # Needs Filter and Stream defined.
|
||||
|
||||
module Log;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
@load const.bif.bro
|
||||
@load types.bif.bro
|
||||
@load base/const.bif
|
||||
@load base/types.bif
|
||||
|
||||
# Type declarations
|
||||
type string_array: table[count] of string;
|
||||
|
@ -298,9 +298,9 @@ type entropy_test_result: record {
|
|||
};
|
||||
|
||||
# Prototypes of Bro built-in functions.
|
||||
@load strings.bif.bro
|
||||
@load bro.bif.bro
|
||||
@load reporter.bif.bro
|
||||
@load base/strings.bif
|
||||
@load base/bro.bif
|
||||
@load base/reporter.bif
|
||||
|
||||
global log_file_name: function(tag: string): string &redef;
|
||||
global open_log_file: function(tag: string): file &redef;
|
||||
|
@ -1264,7 +1264,7 @@ type bittorrent_benc_dir: table[string] of bittorrent_benc_value;
|
|||
# The header table type used by the bittorrenttracker analyzer.
|
||||
type bt_tracker_headers: table[string] of string;
|
||||
|
||||
@load event.bif.bro
|
||||
@load base/event.bif
|
||||
|
||||
# The filter the user has set via the -f command line options, or
|
||||
# empty if none.
|
||||
|
|
|
@ -107,6 +107,12 @@ macro(BIF_TARGET bifInput)
|
|||
add_custom_command(OUTPUT ${bifOutputs}
|
||||
COMMAND bifcl
|
||||
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/${bifInput} || (rm -f ${bifOutputs} && exit 1)
|
||||
# in order be able to run bro from the build directory,
|
||||
# a copy of the generated bro script needs to be copied
|
||||
# to a directory tree named the same way it will be
|
||||
# referenced from an @load
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
ARGS -E copy ${bifInput}.bro base/${bifInput}.bro
|
||||
DEPENDS ${bifInput}
|
||||
DEPENDS bifcl
|
||||
COMMENT "[BIFCL] Processing ${bifInput}"
|
||||
|
@ -121,6 +127,7 @@ endmacro(BIF_TARGET)
|
|||
macro(GET_BIF_OUTPUT_FILES inputFile outputFileVar)
|
||||
set(${outputFileVar}
|
||||
${inputFile}.bro
|
||||
base/${inputFile}.bro
|
||||
${inputFile}.func_def
|
||||
${inputFile}.func_h
|
||||
${inputFile}.func_init
|
||||
|
@ -423,7 +430,7 @@ set(brolibs
|
|||
target_link_libraries(bro ${brolibs})
|
||||
|
||||
install(TARGETS bro DESTINATION bin)
|
||||
install(FILES ${INSTALL_BIF_OUTPUTS} DESTINATION ${POLICYDIR})
|
||||
install(FILES ${INSTALL_BIF_OUTPUTS} DESTINATION ${POLICYDIR}/base)
|
||||
|
||||
set(BRO_EXE bro
|
||||
CACHE STRING "Bro executable binary" FORCE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue