Merge remote-tracking branch 'origin/topic/christian/canonicalize-zeek-config-includes'

* origin/topic/christian/canonicalize-zeek-config-includes:
  Avoid reporting paths repeatedly in zeek-config --include_dir
This commit is contained in:
Jon Siwek 2021-03-05 16:14:23 -08:00
commit 5f7fc043de
3 changed files with 26 additions and 6 deletions

View file

@ -1,4 +1,10 @@
4.1.0-dev.277 | 2021-03-05 16:14:23 -0800
* Avoid reporting paths repeatedly in zeek-config --include_dir (Christian Kreibich, Corelight)
* Fix comment in IP analyzer (Tim Wojtulewicz, Corelight)
4.1.0-dev.272 | 2021-03-01 11:36:06 -0800 4.1.0-dev.272 | 2021-03-01 11:36:06 -0800
* Change update-zeekygen-docs.sh to set release branch in Sphinx config (Jon Siwek, Corelight) * Change update-zeekygen-docs.sh to set release branch in Sphinx config (Jon Siwek, Corelight)

View file

@ -1 +1 @@
4.1.0-dev.272 4.1.0-dev.277

View file

@ -17,11 +17,25 @@ binpac_root=@ZEEK_CONFIG_BINPAC_ROOT_DIR@
caf_root=@ZEEK_CONFIG_CAF_ROOT_DIR@ caf_root=@ZEEK_CONFIG_CAF_ROOT_DIR@
broker_root=@ZEEK_CONFIG_BROKER_ROOT_DIR@ broker_root=@ZEEK_CONFIG_BROKER_ROOT_DIR@
include_dir=${include_dir}:@ZEEK_CONFIG_PCAP_INCLUDE_DIR@ add_path() {
include_dir=${include_dir}:@ZEEK_CONFIG_ZLIB_INCLUDE_DIR@ # $1: existing path
include_dir=${include_dir}:@ZEEK_CONFIG_OPENSSL_INCLUDE_DIR@ # $2: path to add
include_dir=${include_dir}:@ZEEK_CONFIG_LibKrb5_INCLUDE_DIR@ if test -z "$2" || test "$1" = "$2" ||
include_dir=${include_dir}:@ZEEK_CONFIG_GooglePerftools_INCLUDE_DIR@ echo "$1" | grep -q "^$2:" 2>/dev/null ||
echo "$1" | grep -q ":$2:" 2>/dev/null ||
echo "$1" | grep -q ":$2$" 2>/dev/null; then
echo "$1"
return
fi
echo "$1:$2"
}
include_dir=$(add_path "$include_dir" "@ZEEK_CONFIG_PCAP_INCLUDE_DIR@")
include_dir=$(add_path "$include_dir" "@ZEEK_CONFIG_ZLIB_INCLUDE_DIR@")
include_dir=$(add_path "$include_dir" "@ZEEK_CONFIG_OPENSSL_INCLUDE_DIR@")
include_dir=$(add_path "$include_dir" "@ZEEK_CONFIG_LibKrb5_INCLUDE_DIR@")
include_dir=$(add_path "$include_dir" "@ZEEK_CONFIG_GooglePerftools_INCLUDE_DIR@")
usage="\ usage="\
Usage: zeek-config [--version] [--build_type] [--prefix] [--lib_dir] [--script_dir] [--site_dir] [--plugin_dir] [--config_dir] [--python_dir] [--include_dir] [--cmake_dir] [--zeekpath] [--zeek_dist] [--binpac_root] [--caf_root] [--broker_root]" Usage: zeek-config [--version] [--build_type] [--prefix] [--lib_dir] [--script_dir] [--site_dir] [--plugin_dir] [--config_dir] [--python_dir] [--include_dir] [--cmake_dir] [--zeekpath] [--zeek_dist] [--binpac_root] [--caf_root] [--broker_root]"