aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/common/50 custom target chain/usetarget
diff options
context:
space:
mode:
authorAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
committerAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
commitaf1a266670d040d2f4083ff309d732d648afba2a (patch)
tree2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/test cases/common/50 custom target chain/usetarget
parente02cda008591317b1625707ff8e115a4841aa889 (diff)
Add submodule dependency filesHEADmaster
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
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')