Instead of removing the sources every time and rebuilding, just use
rsync to preserve the timestamps and allow Make to do its job of
rebuilding if it changed.
There's a bug in meson that keeps building the testsuite even outside of
`ninja test`, but if the build result is cached, we can greatly minimize
the impact for developers.
Closes: https://github.com/kmod-project/kmod/issues/119
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/121
linux-edge-dev \
meson \
openssl-dev \
+ rsync \
scdoc \
tar \
xz-dev \
multilib-devel \
linux-headers \
meson \
+ rsync \
scdoc \
git \
gtk-doc
libzstd-dev \
linux-headers-generic \
meson \
+ rsync \
scdoc \
zlib1g-dev \
zstd
git \
gtk-doc \
libtool \
+ rsync \
scdoc
# CI builds with KDIR pointing to /usr/lib/modules/*/build
# so just a foo/build pointing to the right place, assuming
libzstd-dev \
linux-headers-generic \
meson \
+ rsync \
scdoc \
zlib1g-dev \
zstd
In order to compile the source code you need the following software packages:
- GCC/CLANG compiler
- GNU C library / musl / uClibc
+ - rsync
+
Optional dependencies:
- ZLIB library
# TODO: meson allows only out of tree builds
if test "$SRCDIR" != "$BUILDDIR"; then
- rm -rf "$MODULE_PLAYGROUND"
- mkdir -p "$(dirname "$MODULE_PLAYGROUND")"
- cp -r "$SRCDIR/$MODULE_PLAYGROUND" "$MODULE_PLAYGROUND"
+ rsync --recursive --times "$SRCDIR/$MODULE_PLAYGROUND/" "$MODULE_PLAYGROUND/"
fi
export MAKEFLAGS=${MAKEFLAGS-"-j$(nproc)"}