mirror of
https://github.com/vel21ripn/nDPI.git
synced 2026-04-28 15:09:47 +00:00
Initial work to support out-of-tree builds ``` ./autogen.sh mkdir build cd build ../configure make make check ``` IMPORTANT: `autogen.sh` doesn't call `configure` automatically anymore!! You have to do: `./autogen.sh && ./configure --$OPTIONS`. A little bit annoying but the pattern `autogen && configure && make` is very common on Linux. Known issues: * `make doc` doesn't work in out-of-tree builds, yet * Windows/MinGW/DPDK (out-of-tree) builds have not been tested, so it is unlikely they work See: #2992
26 lines
1,022 B
Bash
Executable file
26 lines
1,022 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
EXCLUDE_PATTERN="(.*\.m4$|Makefile$|Makefile\.in$|utils/verify_dist_tarball\.sh|^packages/debian/.*|^packages/debian|^test-driver|^config\.guess|^config\.sub|^compile|^configure|/|depcomp|.gitattributes|.gitignore|install-sh|ltmain.sh|missing|src/include/ndpi_config\.h\.in|tests/pcap|tests/result)$"
|
|
|
|
set -x
|
|
set -e
|
|
|
|
cd "$(dirname "${0}")/.."
|
|
|
|
git ls-tree --full-tree --name-only -r HEAD | grep -vE "${EXCLUDE_PATTERN}" | sort >/tmp/ndpi-dist-verify-git.txt
|
|
|
|
TARBALL="${1}"
|
|
if [ -z "${TARBALL}" ]; then
|
|
if [ ! -r Makefile ]; then
|
|
./autogen.sh && ./configure
|
|
fi
|
|
make dist
|
|
AC_VERSION="$(sed -n 's/^AC_INIT.*\([[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+\).*$/\1/gp' < configure.ac)"
|
|
TARBALL="./libndpi-${AC_VERSION}.tar.gz"
|
|
fi
|
|
|
|
tar -tzf "${TARBALL}" | sed -n 's|^[^/]*/||gp' | grep -v '^$' | grep -vE "${EXCLUDE_PATTERN}" | sort >/tmp/ndpi-dist-verify-tar.txt
|
|
|
|
diff -u0 /tmp/ndpi-dist-verify-git.txt /tmp/ndpi-dist-verify-tar.txt
|
|
|
|
rm -f /tmp/ndpi-dist-verify-git.txt /tmp/ndpi-dist-verify-tar.txt
|