summaryrefslogtreecommitdiffstats
path: root/test cases/unit/98 install all targets/subdir
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:41:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:41:38 +0000
commit7b6e527f440cd7e6f8be2b07cee320ee6ca18786 (patch)
tree4a2738d69fa2814659fdadddf5826282e73d81f4 /test cases/unit/98 install all targets/subdir
parentInitial commit. (diff)
downloadmeson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.tar.xz
meson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.zip
Adding upstream version 1.0.1.upstream/1.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test cases/unit/98 install all targets/subdir')
-rw-r--r--test cases/unit/98 install all targets/subdir/bar2-devel.h0
-rw-r--r--test cases/unit/98 install all targets/subdir/foo2.in0
-rw-r--r--test cases/unit/98 install all targets/subdir/foo3-devel.h0
-rw-r--r--test cases/unit/98 install all targets/subdir/lib.c9
-rw-r--r--test cases/unit/98 install all targets/subdir/main.c3
-rw-r--r--test cases/unit/98 install all targets/subdir/meson.build21
-rw-r--r--test cases/unit/98 install all targets/subdir/script.py7
7 files changed, 40 insertions, 0 deletions
diff --git a/test cases/unit/98 install all targets/subdir/bar2-devel.h b/test cases/unit/98 install all targets/subdir/bar2-devel.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test cases/unit/98 install all targets/subdir/bar2-devel.h
diff --git a/test cases/unit/98 install all targets/subdir/foo2.in b/test cases/unit/98 install all targets/subdir/foo2.in
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test cases/unit/98 install all targets/subdir/foo2.in
diff --git a/test cases/unit/98 install all targets/subdir/foo3-devel.h b/test cases/unit/98 install all targets/subdir/foo3-devel.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test cases/unit/98 install all targets/subdir/foo3-devel.h
diff --git a/test cases/unit/98 install all targets/subdir/lib.c b/test cases/unit/98 install all targets/subdir/lib.c
new file mode 100644
index 0000000..2ea9c7d
--- /dev/null
+++ b/test cases/unit/98 install all targets/subdir/lib.c
@@ -0,0 +1,9 @@
+#if defined _WIN32 || defined __CYGWIN__
+#define DLL_PUBLIC __declspec(dllexport)
+#else
+#define DLL_PUBLIC
+#endif
+
+int DLL_PUBLIC foo(void) {
+ return 0;
+}
diff --git a/test cases/unit/98 install all targets/subdir/main.c b/test cases/unit/98 install all targets/subdir/main.c
new file mode 100644
index 0000000..0fb4389
--- /dev/null
+++ b/test cases/unit/98 install all targets/subdir/main.c
@@ -0,0 +1,3 @@
+int main(int argc, char *argv[]) {
+ return 0;
+}
diff --git a/test cases/unit/98 install all targets/subdir/meson.build b/test cases/unit/98 install all targets/subdir/meson.build
new file mode 100644
index 0000000..53c796a
--- /dev/null
+++ b/test cases/unit/98 install all targets/subdir/meson.build
@@ -0,0 +1,21 @@
+configure_file(input: 'foo2.in', output: 'foo2.h',
+ configuration: {'foo': 'bar'},
+ install_dir: get_option('datadir'),
+ install: true,
+)
+custom_target('ct4',
+ output: ['out1.txt', 'out2.txt'],
+ command: ['script.py', '@OUTPUT@'],
+ install_dir: get_option('datadir'),
+ install: true,
+)
+install_headers('foo3-devel.h')
+install_data('bar2-devel.h',
+ install_dir: get_option('includedir'),
+)
+executable('app2', 'main.c',
+ install: true,
+)
+both_libraries('both2', 'lib.c',
+ install: true,
+)
diff --git a/test cases/unit/98 install all targets/subdir/script.py b/test cases/unit/98 install all targets/subdir/script.py
new file mode 100644
index 0000000..c5f3be9
--- /dev/null
+++ b/test cases/unit/98 install all targets/subdir/script.py
@@ -0,0 +1,7 @@
+#!/usr/bin/env python3
+
+import sys
+
+for f in sys.argv[1:]:
+ with open(f, 'w') as f:
+ pass