aboutsummaryrefslogtreecommitdiff
path: root/test cases/common
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2021-01-26 10:32:33 -0800
committerJussi Pakkanen <jpakkane@gmail.com>2021-01-27 21:59:55 +0000
commitf808c955eab983b31feee130f0947c7cb254a94f (patch)
treeb6d71a5288d7cadec4fa1ea1c7782873731ae1c3 /test cases/common
parent633264984b4b2278491476a0997193ff4996b3a6 (diff)
downloadmeson-f808c955eab983b31feee130f0947c7cb254a94f.zip
meson-f808c955eab983b31feee130f0947c7cb254a94f.tar.gz
meson-f808c955eab983b31feee130f0947c7cb254a94f.tar.bz2
intepreter: Allow using file objects for the script_name of add_*_script
It's a bit silly and conveluted to have to call find_program on the output of configure_file, so let's just allow passing files as the script name.
Diffstat (limited to 'test cases/common')
-rw-r--r--test cases/common/54 install script/meson.build8
-rwxr-xr-x[-rw-r--r--]test cases/common/54 install script/myinstall.py0
-rw-r--r--test cases/common/54 install script/test.json1
3 files changed, 9 insertions, 0 deletions
diff --git a/test cases/common/54 install script/meson.build b/test cases/common/54 install script/meson.build
index 696e3f6..eab95ab 100644
--- a/test cases/common/54 install script/meson.build
+++ b/test cases/common/54 install script/meson.build
@@ -25,3 +25,11 @@ t = custom_target(
meson.add_install_script('myinstall.py', 'customtarget', t, '--mode=copy')
meson.add_install_script('myinstall.py', 'customtargetindex', t[0], '--mode=copy')
+
+installer = configure_file(
+ input : 'myinstall.py',
+ output : 'myinstall_copy.py',
+ copy : true,
+)
+
+meson.add_install_script(installer, 'otherdir', afile, '--mode=copy')
diff --git a/test cases/common/54 install script/myinstall.py b/test cases/common/54 install script/myinstall.py
index a573342..a573342 100644..100755
--- a/test cases/common/54 install script/myinstall.py
+++ b/test cases/common/54 install script/myinstall.py
diff --git a/test cases/common/54 install script/test.json b/test cases/common/54 install script/test.json
index 3804fe1..7ac2607 100644
--- a/test cases/common/54 install script/test.json
+++ b/test cases/common/54 install script/test.json
@@ -7,6 +7,7 @@
{"type": "file", "file": "usr/this/does/something-different.dat.in"},
{"type": "file", "file": "usr/dir/a file.txt"},
{"type": "file", "file": "usr/dir/conf.txt"},
+ {"type": "file", "file": "usr/otherdir/a file.txt"},
{"type": "file", "file": "usr/customtarget/1.txt"},
{"type": "file", "file": "usr/customtarget/2.txt"},
{"type": "file", "file": "usr/customtargetindex/1.txt"}