Skip to content

Commit

Permalink
meson/muon: consolidate scripts & sanitise dist
Browse files Browse the repository at this point in the history
Move some of the build-system scripts into a top-level meson-scripts
directly, and add a script (meson-scripts/dist-tarball.sh) to clean up
the dist tarball before it's created.
  • Loading branch information
ThomasAdam authored and Kangie committed Oct 16, 2024
1 parent f49fe76 commit 0b50a36
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
File renamed without changes.
21 changes: 21 additions & 0 deletions meson-scripts/dist-tarball.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
#
# Script to sanitise the tarball when calling "meson dist". By default,
# "meson dist" calls git-archive, which includes more files than the autotools
# version of "make dist".

# TODO: ".*" as a glob might be too much in the future; expand this out...
FILES_TO_IGNORE=".*
mkrelease.sh
dev-docs"

(
cd "$MESON_DIST_ROOT" && {
IFS=$'\n'
for f in $FILES_TO_IGNORE
do
echo "Removing $f from tarball..."
rm -r "./$f"
done
}
)
8 changes: 6 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ add_project_arguments(
language: 'c',
)

# This script is used to clean up the release tarball when calling
# "meson dist".
meson.add_dist_script('meson-scripts/dist-tarball.sh')

cc = meson.get_compiler('c')

# Undefine _FOTIFY_SOURCE explicitly. fvwm3 needs work to support this.
Expand Down Expand Up @@ -374,7 +378,7 @@ conf_out = configure_file(
configuration: conf,
)

conf_cmd = '@0@/runme.sh'.format(meson.current_source_dir())
conf_cmd = '@0@/meson-scripts/conf-cmd.sh'.format(meson.current_source_dir())
build_dir = '@0@/config.h'.format(meson.current_build_dir())
configure_file(
output: 'config.h',
Expand Down Expand Up @@ -566,4 +570,4 @@ summary(
summary_depvals,
bool_yn: true,
section: 'Dependencies',
)
)

0 comments on commit 0b50a36

Please sign in to comment.