The Meson Build System
http://mesonbuild.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
883 B
35 lines
883 B
11 years ago
|
project('custom target', 'c')
|
||
|
|
||
8 years ago
|
python = find_program('python3', required : false)
|
||
|
if not python.found()
|
||
|
python = find_program('python')
|
||
|
endif
|
||
11 years ago
|
|
||
8 years ago
|
# files() is the correct way to do this, but some people
|
||
|
# do this so test that it works.
|
||
11 years ago
|
comp = '@0@/@1@'.format(meson.current_source_dir(), 'my_compiler.py')
|
||
|
comp2 = '@0@/@1@'.format(meson.current_source_dir(), 'my_compiler2.py')
|
||
8 years ago
|
infile = files('data_source.txt')[0]
|
||
11 years ago
|
|
||
|
mytarget = custom_target('bindat',
|
||
9 years ago
|
output : 'data.dat',
|
||
|
command : [python, comp, infile, '@OUTPUT@'],
|
||
11 years ago
|
)
|
||
|
|
||
|
mytarget2 = custom_target('bindat2',
|
||
9 years ago
|
output : 'data2.dat',
|
||
|
command : [python, comp2, mytarget, '@OUTPUT@'],
|
||
|
install : true,
|
||
|
install_dir : 'subdir'
|
||
11 years ago
|
)
|
||
9 years ago
|
|
||
8 years ago
|
mytarget3 = custom_target('bindat3',
|
||
|
output : 'data3.dat',
|
||
|
input : [mytarget],
|
||
|
command : [python, comp2, '@INPUT@', '@OUTPUT@'],
|
||
|
install : true,
|
||
|
install_dir : 'subdir'
|
||
|
)
|
||
|
|
||
9 years ago
|
subdir('usetarget')
|