Merge remote branch 'origin/fastpath'

* origin/fastpath:
  Add alternative way to set BROPATH for running bro from build/ dir.
This commit is contained in:
Robin Sommer 2011-03-02 13:46:33 -08:00
commit c94b13ad39
3 changed files with 16 additions and 4 deletions

View file

@ -37,6 +37,10 @@ endif ()
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) configure_file(bro-path-dev.in ${CMAKE_CURRENT_BINARY_DIR}/bro-path-dev)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/bro-path-dev.sh
"export BROPATH=`${CMAKE_CURRENT_BINARY_DIR}/bro-path-dev`\n")
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/bro-path-dev.csh
"setenv BROPATH `${CMAKE_CURRENT_BINARY_DIR}/bro-path-dev`\n")
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" VERSION LIMIT_COUNT 1) file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" VERSION LIMIT_COUNT 1)

13
INSTALL
View file

@ -92,6 +92,13 @@ 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 For developers that wish to run Bro from the the build/ directory
without performing "make install", see build/bro-path-dev for after performing "make", but without performing "make install", they
an example. will have to first set BROPATH to look for scripts inside the build
directory. Sourcing either build/bro-path-dev.sh or build/bro-path-dev.csh
as appropriate for the current shell accomplishes this. e.g.:
> ./configure
> make
> source build/bro-path-dev.sh
> ./build/src/bro

View file

@ -1,3 +1,4 @@
#!/bin/sh
# After configured by CMake, this file prints the absolute path to policy # 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 # 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 # as policy files that are generated by the BIF compiler at compile time
@ -6,7 +7,7 @@
# the build directory, avoiding the need to install it. This could be # the build directory, avoiding the need to install it. This could be
# done like: # done like:
# #
# BROPATH=`source bro-path-dev` ./src/bro # BROPATH=`./bro-path-dev` ./src/bro
# #
broPolicies=${PROJECT_SOURCE_DIR}/policy:${PROJECT_SOURCE_DIR}/policy/sigs:${PROJECT_SOURCE_DIR}/policy/time-machine broPolicies=${PROJECT_SOURCE_DIR}/policy:${PROJECT_SOURCE_DIR}/policy/sigs:${PROJECT_SOURCE_DIR}/policy/time-machine