merge: branch 'ih/fix-dist-meson'

meson: exclude intermediate files of docs generation from tarball

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1901
This commit is contained in:
Íñigo Huguet 2024-04-04 08:13:14 +00:00
commit c6a8a58548
2 changed files with 5 additions and 11 deletions

View file

@ -149,8 +149,8 @@ fi
if check_run_clean tarball+meson; then
BUILD_TYPE=meson CC=gcc WITH_DOCS=1 CONFIGURE_ONLY=1 contrib/scripts/nm-ci-run.sh
pushd ./build
# dist with meson
meson dist
# dist with meson/ninja
ninja dist
# build with autotools
DISTSRC="./distsrc-$RANDOM"

View file

@ -13,10 +13,6 @@ ensure_var_path() {
fi
}
copy_from_build() {
cp -Tr "$MESON_BUILD_ROOT/$1" "$MESON_DIST_ROOT/$1"
}
if [ "$MESON_BUILD_ROOT" = "" ]; then
if [ "$1" = "--build-root" ]; then
MESON_BUILD_ROOT="$2"
@ -25,11 +21,9 @@ fi
ensure_var_path "MESON_DIST_ROOT"
ensure_var_path "MESON_BUILD_ROOT"
ensure_var_path "MESON_SOURCE_ROOT"
ninja -C "$MESON_BUILD_ROOT" all libnm-doc NetworkManager-doc
mkdir -p "$MESON_DIST_ROOT/docs/"
copy_from_build /docs/api/
copy_from_build /docs/libnm/
copy_from_build /man/
cp -Tr "$MESON_BUILD_ROOT/docs/api/html" "$MESON_DIST_ROOT/docs/api/html"
cp -Tr "$MESON_BUILD_ROOT/docs/libnm/html" "$MESON_DIST_ROOT/docs/libnm/html"
cp "$MESON_BUILD_ROOT/man/"*.[1-8] "$MESON_DIST_ROOT/man"