Debian Codegraph @

vendored-meson/meson/test cases/common/190 install_mode/meson.build

raw
1 project('install_mode test', 'c',
2 default_options : ['install_umask=027', 'libdir=libtest'])
3
4 if build_machine.system() == 'windows'
5 error('MESON_SKIP_TEST: install_mode test requires a Unix-like OS')
6 endif
7
8 # confirm no regressions in install_data
9 install_data('runscript.sh',
10 install_dir : get_option('bindir'),
11 install_mode : ['rwxr-sr-x', 'root', 0])
12
13 # confirm no regressions in install_subdir
14 install_subdir('sub1',
15 install_dir : 'share',
16 install_mode : ['rwxr-x--t', 'root'])
17
18 install_subdir('sub2',
19 install_dir : 'share')
20
21 # test install_mode in configure_file
22 conf = configuration_data()
23 conf.set('var', 'mystring')
24 conf.set('other', 'string 2')
25 conf.set('second', ' bonus')
26 conf.set('BE_TRUE', true)
27 configure_file(input : 'config.h.in',
28 output : 'config.h',
29 configuration : conf,
30 install_dir : 'include',
31 install_mode : 'rw-rwSr--')
32
33 # test install_mode in custom_target
34 custom_target('bindat',
35 output : 'data.dat',
36 input : 'data_source.txt',
37 command : ['cp', '@INPUT@', '@OUTPUT@'],
38 install : true,
39 install_dir : 'subdir',
40 install_mode : 'rw-rwSr--')
41
42 # test install_mode in install_headers
43 install_headers('rootdir.h',
44 install_mode : 'r--r--r-T')
45
46 # test install_mode in install_man
47 install_man('foo.1',
48 install_mode : 'r--r--r-T')
49
50 # test install_mode in executable
51 executable('trivialprog',
52 sources : 'trivial.c',
53 install : true,
54 build_rpath: meson.current_build_dir(),
55 install_mode : ['rwxr-sr-x', 'root', 'root'])
56
57 # test install_mode in static_library
58 static_library('stat', 'stat.c',
59 install : true,
60 install_mode : ['rw---Sr--'])