We need the subdir of where the output file will actually be created, not the current subdir of the interpreter. Fixes: #13168pull/13032/merge
parent
a0ff145512
commit
23eb7ba700
3 changed files with 29 additions and 5 deletions
@ -0,0 +1,4 @@ |
|||||||
|
test_header = custom_target( |
||||||
|
output: 'test_header.h', |
||||||
|
command: [python, args, '@OUTPUT@'], |
||||||
|
) |
@ -0,0 +1,24 @@ |
|||||||
|
project('276 generator custom_tgt subdir') |
||||||
|
|
||||||
|
python = find_program('python3', required: true) |
||||||
|
args = [ |
||||||
|
'-c', |
||||||
|
'import sys; open(sys.argv[1], "w")', |
||||||
|
'@OUTPUT0@', |
||||||
|
] |
||||||
|
|
||||||
|
subdir('include') |
||||||
|
|
||||||
|
gen = generator( |
||||||
|
python, |
||||||
|
arguments: args + ['@OUTPUT@'], |
||||||
|
output: '@PLAINNAME@.t', |
||||||
|
) |
||||||
|
|
||||||
|
custom_target( |
||||||
|
'check-headers.stamp', |
||||||
|
command: [python, args, '@INPUT@'], |
||||||
|
input: gen.process(test_header), |
||||||
|
output: 'check-headers.stamp', |
||||||
|
build_by_default: true, |
||||||
|
) |
Loading…
Reference in new issue