Debian Codegraph @

test/blackbox-tests/test-cases/stanzas/mdx-stanza/shared-libraries.t

raw
1 mdx supports dependencies referencing shared libraries.
2
3 See #10582.
4
5 $ cat > dune-project << EOF
6 > (lang dune 3.15)
7 > (name dune_mdx_test)
8 > (using mdx 0.4)
9 > EOF
10
11 $ cat > dune << EOF
12 > (library
13 > (name public_lib)
14 > (foreign_archives test))
15 >
16 > (rule
17 > (deps test.c)
18 > (targets libtest.a dlltest.so)
19 > (action
20 > (progn
21 > (run gcc -c -fPIC test.c -o test.o)
22 > (run gcc test.o -shared -o dlltest.so)
23 > (run ar rcs libtest.a test.o))))
24 >
25 > (mdx
26 > (libraries public_lib))
27 > EOF
28
29 $ touch README.md
30
31 $ cat > public_lib.ml << EOF
32 > let foo bar = bar + 1
33 > EOF
34
35 $ cat > test.c << EOF
36 > int add(int a, int b) {
37 > return a + b;
38 > }
39 > EOF
40
41 $ dune runtest