Merge remote-tracking branch 'origin/topic/awelzel/install-spicyz-config-h'

* origin/topic/awelzel/install-spicyz-config-h:
  Add license header to zeek-config*.h and zeek-version.h
  Rename util-config.h to zeek-config-paths.h and install it
  Ensure spicyz/config.h is installed
This commit is contained in:
Arne Welzel 2023-05-17 16:10:57 +02:00
commit b8a088d6f0
11 changed files with 33 additions and 6 deletions

13
CHANGES
View file

@ -1,3 +1,16 @@
6.0.0-dev.602 | 2023-05-17 16:10:57 +0200
* Add license header to zeek-config*.h and zeek-version.h (Arne Welzel, Corelight)
* Rename util-config.h to zeek-config-paths.h and install it (Arne Welzel, Corelight)
The util-config.h has never been installed previously. Skimming the history,
it was only meant for inclusion from util.cc, hence the name. Now that it's
included from some other headers, rename it to align with what it
contains and install it, too.
* Ensure spicyz/config.h is installed (Arne Welzel, Corelight)
6.0.0-dev.598 | 2023-05-17 12:46:23 +0200 6.0.0-dev.598 | 2023-05-17 12:46:23 +0200
* Introduce environment variables to override more paths configured * Introduce environment variables to override more paths configured

View file

@ -1112,10 +1112,16 @@ string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zeek-version.h.in configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zeek-version.h.in
${CMAKE_CURRENT_BINARY_DIR}/zeek-version.h) ${CMAKE_CURRENT_BINARY_DIR}/zeek-version.h)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/zeek-version.h DESTINATION include/zeek) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/zeek-version.h DESTINATION include/zeek)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zeek-config.h.in configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zeek-config.h.in
${CMAKE_CURRENT_BINARY_DIR}/zeek-config.h) ${CMAKE_CURRENT_BINARY_DIR}/zeek-config.h)
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/zeek-config.h DESTINATION include/zeek) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/zeek-config.h DESTINATION include/zeek)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zeek-config-paths.h.in
${CMAKE_CURRENT_BINARY_DIR}/zeek-config-paths.h)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/zeek-config-paths.h DESTINATION include/zeek)
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "." "${CMAKE_CURRENT_BINARY_DIR}/zeek") execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "." "${CMAKE_CURRENT_BINARY_DIR}/zeek")
if (BinPAC_ROOT_DIR) if (BinPAC_ROOT_DIR)

View file

@ -1 +1 @@
6.0.0-dev.598 6.0.0-dev.602

View file

@ -16,7 +16,6 @@ execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink ".."
string(REPLACE "\"" "\\\"" ZEEK_BUILD_INFO_ESCAPED "${ZEEK_BUILD_INFO}") string(REPLACE "\"" "\\\"" ZEEK_BUILD_INFO_ESCAPED "${ZEEK_BUILD_INFO}")
string(REPLACE "\n" "\\n" ZEEK_BUILD_INFO_ESCAPED "${ZEEK_BUILD_INFO_ESCAPED}") string(REPLACE "\n" "\\n" ZEEK_BUILD_INFO_ESCAPED "${ZEEK_BUILD_INFO_ESCAPED}")
configure_file(version.c.in ${CMAKE_CURRENT_BINARY_DIR}/version.c) configure_file(version.c.in ${CMAKE_CURRENT_BINARY_DIR}/version.c)
configure_file(util-config.h.in ${CMAKE_CURRENT_BINARY_DIR}/util-config.h)
# This creates a custom command to transform a bison output file (inFile) into # This creates a custom command to transform a bison output file (inFile) into
# outFile in order to avoid symbol conflicts: - replaces instances of 'yylex' in # outFile in order to avoid symbol conflicts: - replaces instances of 'yylex' in

View file

@ -31,7 +31,7 @@
#include "zeek/spicy/file-analyzer.h" #include "zeek/spicy/file-analyzer.h"
#include "zeek/spicy/packet-analyzer.h" #include "zeek/spicy/packet-analyzer.h"
#include "zeek/spicy/protocol-analyzer.h" #include "zeek/spicy/protocol-analyzer.h"
#include "zeek/util-config.h" #include "zeek/zeek-config-paths.h"
using namespace zeek; using namespace zeek;
using namespace zeek::spicy; using namespace zeek::spicy;

View file

@ -1,6 +1,7 @@
# See the file "COPYING" in the main distribution directory for copyright. # See the file "COPYING" in the main distribution directory for copyright.
configure_file(config.h.in config.h) configure_file(config.h.in config.h)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h DESTINATION include/zeek/spicy/spicyz)
add_executable(spicyz driver.cc glue-compiler.cc main.cc) add_executable(spicyz driver.cc glue-compiler.cc main.cc)
target_compile_options(spicyz PRIVATE "-Wall") target_compile_options(spicyz PRIVATE "-Wall")

View file

@ -6,7 +6,7 @@
#include <hilti/rt/filesystem.h> #include <hilti/rt/filesystem.h>
#include "zeek/util-config.h" #include "zeek/zeek-config-paths.h"
namespace zeek::spicy::configuration { namespace zeek::spicy::configuration {

View file

@ -4,7 +4,7 @@
#include "zeek/zeek-config.h" #include "zeek/zeek-config.h"
#include "util-config.h" #include "zeek/zeek-config-paths.h"
#ifdef HAVE_DARWIN #ifdef HAVE_DARWIN
#include <mach/mach_init.h> #include <mach/mach_init.h>

View file

@ -1,3 +1,7 @@
// See the file "COPYING" in the main distribution directory for copyright.
#pragma once
#define ZEEK_SCRIPT_INSTALL_PATH "@ZEEK_SCRIPT_INSTALL_PATH@" #define ZEEK_SCRIPT_INSTALL_PATH "@ZEEK_SCRIPT_INSTALL_PATH@"
#define BRO_PLUGIN_INSTALL_PATH "@ZEEK_PLUGIN_DIR@" #define BRO_PLUGIN_INSTALL_PATH "@ZEEK_PLUGIN_DIR@"
#define ZEEK_PLUGIN_INSTALL_PATH "@ZEEK_PLUGIN_DIR@" #define ZEEK_PLUGIN_INSTALL_PATH "@ZEEK_PLUGIN_DIR@"

View file

@ -1,3 +1,5 @@
// See the file "COPYING" in the main distribution directory for copyright.
#pragma once #pragma once
/* Old libpcap versions (< 0.6.1) need defining pcap_freecode and /* Old libpcap versions (< 0.6.1) need defining pcap_freecode and

View file

@ -1,3 +1,5 @@
// See the file "COPYING" in the main distribution directory for copyright.
#pragma once #pragma once
/* Version number of package */ /* Version number of package */