Debian Codegraph @

test cases/common/14 configure file/subdir/meson.build

raw
1 # Configure in subdir with absolute paths for input and relative for output
2 configure_file(input : '../dummy.dat',
3 output : 'config2-1.h',
4 command : [genprog, scriptfile, ifile, 'config2-1.h'],
5 install_dir : 'share/appdireh')
6 run_command(check_file, join_paths(meson.current_build_dir(), 'config2-1.h'), check: true)
7
8 # Configure in subdir with files() for input and relative for output
9 configure_file(input : '../dummy.dat',
10 output : 'config2-2.h',
11 command : [genprog, scriptfile, files('../dummy.dat'), 'config2-2.h'],
12 install_dir : 'share/appdirok')
13 run_command(check_file, join_paths(meson.current_build_dir(), 'config2-2.h'), check: true)
14
15 # Configure in subdir with string templates for input and output
16 configure_file(input : '../dummy.dat',
17 output : 'config2-3.h',
18 command : [found_script, '@INPUT@', '@OUTPUT@'])
19 run_command(check_file, join_paths(meson.current_build_dir(), 'config2-3.h'), check: true)
20
21 # Test that overwriting an existing file creates a warning.
22 configure_file(
23 input: '../test.py.in',
24 output: 'double_output2.txt',
25 configuration: conf
26 )
27 configure_file(
28 input: '../test.py.in',
29 output: 'double_output2.txt',
30 configuration: conf
31 )
32
33 # Test that the same file name in a different subdir will not create a warning
34 configure_file(
35 input: '../test.py.in',
36 output: 'no_write_conflict.txt',
37 configuration: conf
38 )