Debian Codegraph @

test cases/common/69 configure file in custom target/src/meson.build

raw
1 custom_target('thing',
2 output : 'final.dat',
3 input : cfile,
4 command : [find_program('mycompiler.py'), '@INPUT@', '@OUTPUT@'])
5
6 # Test usage of a `configure_file` as part of the command list
7 py3 = find_program('python3', required : false)
8 if not py3.found()
9 # Maybe 'python' is Python 3
10 py3 = find_program('python')
11 endif
12
13 compiler = configure_file(input : 'mycompiler.py',
14 output : 'mycompiler2.py',
15 copy: true)
16
17 custom_target('thing2',
18 output : 'final2.dat',
19 input : cfile,
20 command : [py3, compiler, '@INPUT@', '@OUTPUT@'])