mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 03:58:20 +00:00
Changes to make running bro from build dir easier.
The 'bro-path-dev' script is configured at make time to echo the right paths to policy files.
This commit is contained in:
parent
efbd22a33f
commit
e89182dcc0
5 changed files with 28 additions and 2 deletions
|
@ -36,6 +36,8 @@ endif ()
|
||||||
# (CMake is confused by ~ as a representation of home directory)
|
# (CMake is confused by ~ as a representation of home directory)
|
||||||
get_filename_component(POLICYDIR ${POLICYDIR} ABSOLUTE)
|
get_filename_component(POLICYDIR ${POLICYDIR} ABSOLUTE)
|
||||||
|
|
||||||
|
configure_file(bro-path-dev.in ${CMAKE_CURRENT_BINARY_DIR}/bro-path-dev)
|
||||||
|
|
||||||
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" VERSION LIMIT_COUNT 1)
|
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" VERSION LIMIT_COUNT 1)
|
||||||
|
|
||||||
set(EXTRA_COMPILE_FLAGS "-Wall -Wno-unused")
|
set(EXTRA_COMPILE_FLAGS "-Wall -Wno-unused")
|
||||||
|
|
4
INSTALL
4
INSTALL
|
@ -85,3 +85,7 @@ Bro is a complex program and it takes a bit of time to get familiar
|
||||||
with it. In the following we give a few simple examples. See the
|
with it. In the following we give a few simple examples. See the
|
||||||
quickstart guide at http://www.bro-ids.org for more information; you
|
quickstart guide at http://www.bro-ids.org for more information; you
|
||||||
can the source that in doc/quick-start.
|
can the source that in doc/quick-start.
|
||||||
|
|
||||||
|
For developers that wish to run Bro after performing "make", but
|
||||||
|
without performing "make install", see build/bro-path-dev for
|
||||||
|
an example.
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 7142f6d7a49a17e791dc8b3d1a5e8a867e4118fe
|
Subproject commit 095e6e070f5cd2ac634ceb65c4fe2633a5551902
|
20
bro-path-dev.in
Normal file
20
bro-path-dev.in
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# After configured by CMake, this file prints the absolute path to policy
|
||||||
|
# files that come with the source distributions of Bro and Broctl as well
|
||||||
|
# as policy files that are generated by the BIF compiler at compile time
|
||||||
|
#
|
||||||
|
# The intended use of this script is to make it easier to run Bro from
|
||||||
|
# the build directory, avoiding the need to install it. This could be
|
||||||
|
# done like:
|
||||||
|
#
|
||||||
|
# BROPATH=`source bro-path-dev` ./src/bro
|
||||||
|
#
|
||||||
|
|
||||||
|
broPolicies=${PROJECT_SOURCE_DIR}/policy:${PROJECT_SOURCE_DIR}/policy/sigs:${PROJECT_SOURCE_DIR}/policy/time-machine
|
||||||
|
|
||||||
|
broGenPolicies=${CMAKE_BINARY_DIR}/src
|
||||||
|
|
||||||
|
broctlPolicies=${PROJECT_SOURCE_DIR}/aux/broctl/policy:${CMAKE_BINARY_DIR}/aux/broctl/policy/local
|
||||||
|
|
||||||
|
installedPolicies=${POLICYDIR}:${POLICYDIR}/sigs:${POLICYDIR}/time-machine:${POLICYDIR}/site
|
||||||
|
|
||||||
|
echo .:$distPolicies:$genPolicies:$broctlPolicies
|
|
@ -776,7 +776,7 @@ const char* bro_path()
|
||||||
{
|
{
|
||||||
const char* path = getenv("BROPATH");
|
const char* path = getenv("BROPATH");
|
||||||
if ( ! path )
|
if ( ! path )
|
||||||
path = ".:policy:policy/sigs:policy/time-machine:"
|
path = ".:"
|
||||||
POLICYDEST ":"
|
POLICYDEST ":"
|
||||||
POLICYDEST "/sigs:"
|
POLICYDEST "/sigs:"
|
||||||
POLICYDEST "/time-machine:"
|
POLICYDEST "/time-machine:"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue