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.
24 lines
598 B
24 lines
598 B
project('object generator', 'c') |
|
|
|
python = find_program('python3') |
|
|
|
# Note that this will not add a dependency to the compiler executable. |
|
# Code will not be rebuilt if it changes. |
|
comp = '@0@/@1@'.format(meson.current_source_dir(), 'obj_generator.py') |
|
|
|
if host.name() == 'windows' |
|
outputname = '@BASENAME@.obj' |
|
else |
|
outputname = '@BASENAME@.o' |
|
endif |
|
|
|
# Generate a header file that needs to be included. |
|
gen = generator(python, |
|
output : outputname, |
|
arguments : [comp, '@INPUT@', '@OUTPUT@']) |
|
|
|
generated = gen.process('source.c') |
|
|
|
e = executable('prog', 'prog.c', generated) |
|
|
|
test('objgen', e) |