get-and-build-libndpi.sh uses GMake MAKEFLAGS for sub-make (required for e.g. jobserver)

* fixed invalid CMake `test -r ...`

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
Toni Uhlig
2023-06-26 13:11:21 +02:00
parent d107560049
commit 967381a599
3 changed files with 8 additions and 5 deletions

View File

@@ -225,10 +225,8 @@ if(BUILD_NDPI)
add_custom_target(clean-libnDPI
COMMAND ${CMAKE_BUILD_TOOL} clean
COMMAND test -r ${CMAKE_SOURCE_DIR}/libnDPI/Makefile
COMMAND rm -rf ${CMAKE_BINARY_DIR}/libnDPI
COMMAND rm -f ${CMAKE_BINARY_DIR}/libnDPI-prefix/src/libnDPI-stamp/libnDPI-configure
COMMAND git submodule deinit -f ${CMAKE_SOURCE_DIR}/libnDPI
)
set(STATIC_LIBNDPI_INSTALLDIR "${CMAKE_BINARY_DIR}/libnDPI")

View File

@@ -49,8 +49,8 @@
#define DLT_DSA_TAG_EDSA 285
#endif
#if ((NDPI_MAJOR == 4 && NDPI_MINOR < 8) || NDPI_MAJOR < 4) && NDPI_API_VERSION < 7001
#error "nDPI >= 4.8.0 or API version >= 7001 required"
#if ((NDPI_MAJOR == 4 && NDPI_MINOR < 7) || NDPI_MAJOR < 4) && NDPI_API_VERSION < 7001
#error "nDPI >= 4.7.0 or API version >= 7001 required"
#endif
#if nDPId_MAX_READER_THREADS <= 0

View File

@@ -26,6 +26,10 @@ if [ ! -z "${CC}" ]; then
HOST_TRIPLET="$(${CC} ${CFLAGS} -dumpmachine)"
fi
if [ ! -z "${MAKEFLAGS}" ]; then
MAKEFLAGS="-${MAKEFLAGS}"
fi
cat <<EOF
------ environment variables ------
HOST_TRIPLET=${HOST_TRIPLET}
@@ -38,6 +42,7 @@ CFLAGS=${CFLAGS:-}
LDFLAGS=${LDFLAGS:-}
ADDITIONAL_ARGS=${ADDITIONAL_ARGS:-}
MAKE_PROGRAM=${MAKE_PROGRAM:-}
MAKEFLAGS=${MAKEFLAGS}
DEST_INSTALL=${DEST_INSTALL:-}
-----------------------------------
EOF
@@ -84,6 +89,6 @@ HOST_ARG="--host=${HOST_TRIPLET}"
./autogen.sh --enable-option-checking=fatal \
--prefix="/" \
--with-only-libndpi ${HOST_ARG} ${ADDITIONAL_ARGS}
${MAKE_PROGRAM} install DESTDIR="${DEST_INSTALL}"
${MAKE_PROGRAM} ${MAKEFLAGS} install DESTDIR="${DEST_INSTALL}"
rm -f "${LOCKFILE}"