As Tobias reported, rsync is a bit of heavyweight dependency. We
introduced it, as a replacement for the rm/cp -r previously used.
The rsync was inspired since, unlike make, meson will build all the test
binaries/artefacts even without calling "meson test".
We can go back to cp with --archive (--preserve=timestamps at least),
which will ensure we don't get stale files. To ensure the second run
doesn't copy the source folder as _subfolder_ of the dest we need to
wildcard the copy... Plus we need a proper destination folder in the
first place.
With this, we get a no-op second+ builds - be that with meson or make.
Since the explicit always-dirty state is by design, drop the meson TODO
and document the output variable.
Confirmed by comparing both the `make --debug` output and the execution
times.
Reported-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/192
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
linux-edge-dev \
meson \
openssl-dev \
- rsync \
scdoc \
tar \
xz-dev \
gtk-doc \
linux-headers \
meson \
- rsync \
scdoc
libzstd-dev \
linux-headers-generic \
meson \
- rsync \
scdoc \
zlib1g-dev \
zstd
make \
meson \
openssl-devel \
- rsync \
scdoc \
xz-devel \
zlib-devel
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
- rsync --recursive --times "$SRCDIR/$MODULE_PLAYGROUND/" "$MODULE_PLAYGROUND/"
+ mkdir -p "$MODULE_PLAYGROUND"
+ cp --archive "$SRCDIR/$MODULE_PLAYGROUND/"* "$MODULE_PLAYGROUND/"
fi
export MAKEFLAGS=${MAKEFLAGS-"-j$(nproc)"}
meson.project_build_root(),
'testsuite/module-playground', # do not prepend source/build root
],
+ # The command ensures we don't do extra work, so the missing output token file
+ # and the build_always_stale true are intentional.
output : 'bb-rootfs',
console : true,
- build_always_stale : true, # TODO: only when the playground has changed
+ build_always_stale : true,
build_by_default : false,
)