aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/common/157 custom target subdir depend files
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/157 custom target subdir depend files
parente02cda008591317b1625707ff8e115a4841aa889 (diff)
Add submodule dependency filesHEADmaster
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/test cases/common/157 custom target subdir depend files')
-rw-r--r--meson/test cases/common/157 custom target subdir depend files/copyfile.py6
-rw-r--r--meson/test cases/common/157 custom target subdir depend files/meson.build7
-rw-r--r--meson/test cases/common/157 custom target subdir depend files/subdir/dep.dat1
-rw-r--r--meson/test cases/common/157 custom target subdir depend files/subdir/foo.c.in6
-rw-r--r--meson/test cases/common/157 custom target subdir depend files/subdir/meson.build6
5 files changed, 26 insertions, 0 deletions
diff --git a/meson/test cases/common/157 custom target subdir depend files/copyfile.py b/meson/test cases/common/157 custom target subdir depend files/copyfile.py
new file mode 100644
index 000000000..ff42ac359
--- /dev/null
+++ b/meson/test cases/common/157 custom target subdir depend files/copyfile.py
@@ -0,0 +1,6 @@
+#!/usr/bin/env python3
+
+import sys
+import shutil
+
+shutil.copyfile(sys.argv[1], sys.argv[2])
diff --git a/meson/test cases/common/157 custom target subdir depend files/meson.build b/meson/test cases/common/157 custom target subdir depend files/meson.build
new file mode 100644
index 000000000..44f5c7157
--- /dev/null
+++ b/meson/test cases/common/157 custom target subdir depend files/meson.build
@@ -0,0 +1,7 @@
+project('custom target subdir depend files', 'c')
+
+copy = find_program('copyfile.py')
+
+subdir('subdir')
+
+executable('foo', foo_src)
diff --git a/meson/test cases/common/157 custom target subdir depend files/subdir/dep.dat b/meson/test cases/common/157 custom target subdir depend files/subdir/dep.dat
new file mode 100644
index 000000000..5daee496d
--- /dev/null
+++ b/meson/test cases/common/157 custom target subdir depend files/subdir/dep.dat
@@ -0,0 +1 @@
+You can depend on this file. \ No newline at end of file
diff --git a/meson/test cases/common/157 custom target subdir depend files/subdir/foo.c.in b/meson/test cases/common/157 custom target subdir depend files/subdir/foo.c.in
new file mode 100644
index 000000000..a867b3237
--- /dev/null
+++ b/meson/test cases/common/157 custom target subdir depend files/subdir/foo.c.in
@@ -0,0 +1,6 @@
+#include <stdio.h>
+
+int main(void) {
+ printf("foo is working.\n");
+ return 0;
+}
diff --git a/meson/test cases/common/157 custom target subdir depend files/subdir/meson.build b/meson/test cases/common/157 custom target subdir depend files/subdir/meson.build
new file mode 100644
index 000000000..f9d31c4c7
--- /dev/null
+++ b/meson/test cases/common/157 custom target subdir depend files/subdir/meson.build
@@ -0,0 +1,6 @@
+foo_src = custom_target('foo_src',
+ depend_files : 'dep.dat',
+ input : 'foo.c.in',
+ output : 'foo.c',
+ command : [copy, '@INPUT@', '@OUTPUT@']
+)