From 49a8e90bc78c17600eb4903ba00be26341df9161 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 12 Nov 2019 01:34:30 -0500 Subject: meson: make non-symlink scripts install for real, and use a better wrapper We now generate the scripts using their real name, install them using meson's builtin facility instead of an install_script, and generate the wrapper scripts in the root of the build directory, instead of a subdirectory. This gets us closer to resolving FS#64394. Signed-off-by: Eli Schwartz Signed-off-by: Allan McRae --- meson.build | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 2c9185a6..572526b2 100644 --- a/meson.build +++ b/meson.build @@ -32,7 +32,6 @@ SED = find_program('sed') DU = find_program('du') LDCONFIG = get_option('ldconfig') MESON_MAKE_SYMLINK = join_paths(meson.source_root(), 'build-aux/meson-make-symlink.sh') -MESON_INSTALL_SCRIPT = join_paths(meson.source_root(), 'build-aux/meson-install-script.sh') BASH = find_program('bash4', 'bash') if BASH.found() @@ -366,6 +365,21 @@ executable( install : true, ) +foreach wrapper : script_wrappers + cdata = configuration_data() + cdata.set_quoted('BASH', BASH.path()) + cdata.set_quoted('BUILDDIR', wrapper[2]) + cdata.set_quoted('REAL_PROGPATH', wrapper[1].full_path()) + + # Create a wrapper script that bootstraps the real script within the build + # directory. Use configure_file instead of a custom_target to ensure that + # permissions on the input script wrapper are preserved. + configure_file( + input : join_paths(meson.source_root(), 'build-aux', 'script-wrapper.sh.in'), + output : wrapper[0], + configuration : cdata) +endforeach + configure_file( input : 'etc/makepkg.conf.in', output : 'makepkg.conf', -- cgit v1.2.3-54-g00ecf