diff --git a/runme.sh b/meson-scripts/conf-cmd.sh similarity index 100% rename from runme.sh rename to meson-scripts/conf-cmd.sh diff --git a/meson-scripts/dist-tarball.sh b/meson-scripts/dist-tarball.sh new file mode 100755 index 000000000..a67bb4029 --- /dev/null +++ b/meson-scripts/dist-tarball.sh @@ -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 + } +) \ No newline at end of file diff --git a/meson.build b/meson.build index bffc1779a..bf376e6ca 100644 --- a/meson.build +++ b/meson.build @@ -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. @@ -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', @@ -566,4 +570,4 @@ summary( summary_depvals, bool_yn: true, section: 'Dependencies', -) +) \ No newline at end of file