scripts/meson: ensure wrapper scripts are executable
This commit is contained in:
parent
1aaf95089a
commit
d81b5cc2a5
1 changed files with 9 additions and 12 deletions
|
@ -52,21 +52,18 @@ foreach script : wrapped_scripts
|
||||||
depend_files : library_files,
|
depend_files : library_files,
|
||||||
build_by_default : true)
|
build_by_default : true)
|
||||||
|
|
||||||
|
cdata = configuration_data()
|
||||||
|
cdata.set_quoted('BASH', BASH.path())
|
||||||
|
cdata.set_quoted('BUILDDIR', meson.current_build_dir())
|
||||||
|
cdata.set_quoted('REAL_PROGPATH', internal_script.full_path())
|
||||||
|
|
||||||
# Create a wrapper script that bootstraps the real script within the build
|
# Create a wrapper script that bootstraps the real script within the build
|
||||||
# directory.
|
# directory. Use configure_file instead of a custom_target to ensure that
|
||||||
custom_target(
|
# permissions on the input script wrapper are preserved.
|
||||||
'wrap_@0@'.format(script_shortname),
|
configure_file(
|
||||||
input : join_paths(meson.source_root(), 'build-aux', 'script-wrapper.sh.in'),
|
input : join_paths(meson.source_root(), 'build-aux', 'script-wrapper.sh.in'),
|
||||||
output : script_shortname,
|
output : script_shortname,
|
||||||
build_by_default : true,
|
configuration : cdata)
|
||||||
command : [
|
|
||||||
SED,
|
|
||||||
'-e', 's,@BASH@,"@0@",'.format(BASH.path()),
|
|
||||||
'-e', 's,@BUILDDIR@,"@0@",'.format(meson.current_build_dir()),
|
|
||||||
'-e', 's,@REAL_PROGPATH@,"@0@",'.format(internal_script.full_path()),
|
|
||||||
'@INPUT@',
|
|
||||||
],
|
|
||||||
capture : true)
|
|
||||||
|
|
||||||
# Install the real script
|
# Install the real script
|
||||||
meson.add_install_script(MESON_INSTALL_SCRIPT,
|
meson.add_install_script(MESON_INSTALL_SCRIPT,
|
||||||
|
|
Loading…
Add table
Reference in a new issue