aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/common/50 custom target chain/usetarget
diff options
context:
space:
mode:
Diffstat (limited to 'meson/test cases/common/50 custom target chain/usetarget')
-rw-r--r--meson/test cases/common/50 custom target chain/usetarget/meson.build8
-rw-r--r--meson/test cases/common/50 custom target chain/usetarget/myexe.c6
-rwxr-xr-xmeson/test cases/common/50 custom target chain/usetarget/subcomp.py7
3 files changed, 21 insertions, 0 deletions
diff --git a/meson/test cases/common/50 custom target chain/usetarget/meson.build b/meson/test cases/common/50 custom target chain/usetarget/meson.build
new file mode 100644
index 000000000..9aece8ce9
--- /dev/null
+++ b/meson/test cases/common/50 custom target chain/usetarget/meson.build
@@ -0,0 +1,8 @@
+e = executable('myexe', 'myexe.c')
+subexe = find_program('subcomp.py')
+
+custom_target('use_exe',
+ input : e,
+ output : 'subout.res',
+ command : [subexe, '@INPUT@', '@OUTPUT@'],
+)
diff --git a/meson/test cases/common/50 custom target chain/usetarget/myexe.c b/meson/test cases/common/50 custom target chain/usetarget/myexe.c
new file mode 100644
index 000000000..33311332e
--- /dev/null
+++ b/meson/test cases/common/50 custom target chain/usetarget/myexe.c
@@ -0,0 +1,6 @@
+#include<stdio.h>
+
+int main(void) {
+ printf("I am myexe.\n");
+ return 0;
+}
diff --git a/meson/test cases/common/50 custom target chain/usetarget/subcomp.py b/meson/test cases/common/50 custom target chain/usetarget/subcomp.py
new file mode 100755
index 000000000..52dc0bbb5
--- /dev/null
+++ b/meson/test cases/common/50 custom target chain/usetarget/subcomp.py
@@ -0,0 +1,7 @@
+#!/usr/bin/env python3
+
+import sys
+
+with open(sys.argv[1], 'rb') as ifile:
+ with open(sys.argv[2], 'w') as ofile:
+ ofile.write('Everything ok.\n')