aboutsummaryrefslogtreecommitdiff
path: root/manual tests
diff options
context:
space:
mode:
authorIgor Gnatenko <i.gnatenko.brain@gmail.com>2015-03-20 01:26:48 +0300
committerIgor Gnatenko <i.gnatenko.brain@gmail.com>2015-03-21 00:50:20 +0300
commitbcf6ff15a41c21cc9ee0fc241a897e1c11e81c2d (patch)
tree701708da301d71efb4a81bd82bf034ab526c3dbc /manual tests
parentbe7bea6b083b144825dfb43aaa40a6fe829e7afc (diff)
downloadmeson-bcf6ff15a41c21cc9ee0fc241a897e1c11e81c2d.zip
meson-bcf6ff15a41c21cc9ee0fc241a897e1c11e81c2d.tar.gz
meson-bcf6ff15a41c21cc9ee0fc241a897e1c11e81c2d.tar.bz2
modules/rpm: add example
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Diffstat (limited to 'manual tests')
-rw-r--r--manual tests/4 rpm/lib.c6
-rw-r--r--manual tests/4 rpm/lib.h1
-rw-r--r--manual tests/4 rpm/main.c8
-rw-r--r--manual tests/4 rpm/meson.build13
4 files changed, 28 insertions, 0 deletions
diff --git a/manual tests/4 rpm/lib.c b/manual tests/4 rpm/lib.c
new file mode 100644
index 0000000..efc230a
--- /dev/null
+++ b/manual tests/4 rpm/lib.c
@@ -0,0 +1,6 @@
+#include"lib.h"
+
+char *meson_print(void)
+{
+ return "Hello, world!";
+}
diff --git a/manual tests/4 rpm/lib.h b/manual tests/4 rpm/lib.h
new file mode 100644
index 0000000..08fc961
--- /dev/null
+++ b/manual tests/4 rpm/lib.h
@@ -0,0 +1 @@
+char *meson_print(void);
diff --git a/manual tests/4 rpm/main.c b/manual tests/4 rpm/main.c
new file mode 100644
index 0000000..5c46721
--- /dev/null
+++ b/manual tests/4 rpm/main.c
@@ -0,0 +1,8 @@
+#include<lib.h>
+#include<stdio.h>
+int main(int argc, char **argv)
+{
+ char *t = meson_print();
+ printf("%s", t);
+ return 0;
+}
diff --git a/manual tests/4 rpm/meson.build b/manual tests/4 rpm/meson.build
new file mode 100644
index 0000000..bb89916
--- /dev/null
+++ b/manual tests/4 rpm/meson.build
@@ -0,0 +1,13 @@
+project('test spec', 'c')
+
+rpm = import('rpm')
+dependency('zlib')
+
+lib = shared_library('mesontest_shared', ['lib.c', 'lib.h'],
+ version : '0.1', soversion : '0',
+ install : true)
+executable('mesontest-bin', 'main.c',
+ link_with : lib,
+ install : true)
+
+rpm.generate_spec()