meson: generate run helper

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
Pavel Hrdina 2020-07-01 02:52:45 +02:00
parent 932a5b5499
commit 1dfd4248e9
3 changed files with 12 additions and 3 deletions

View File

@ -103,8 +103,6 @@ m4_if(m4_version_compare([2.61a.100],
[AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
[GNUmakefile=$GNUmakefile])])
AC_CONFIG_FILES([run],
[chmod +x,-w run])
AC_CONFIG_FILES([\
Makefile \
.color_coded \

View File

@ -2315,6 +2315,17 @@ endif
configure_file(output: 'meson-config.h', configuration: conf)
# generate run helper
run_conf = configuration_data()
run_conf.set('abs_builddir', meson.build_root())
configure_file(
input: 'run.in',
output: 'run',
configuration: run_conf,
)
run_command('chmod', 'a+x', meson.current_build_dir() / 'run')
# print configuration summary
driver_summary = {

2
run.in
View File

@ -71,4 +71,4 @@ random_val="$(awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null)"
export MALLOC_PERTURB_=$random_val
# Run the program.
exec $b/libtool --mode=execute "$@"
exec "$@"