parent
e4a8f4dbd6
commit
e559ea0b7c
4 changed files with 68 additions and 8 deletions
@ -0,0 +1,6 @@ |
||||
#! /usr/bin/env python3 |
||||
import sys |
||||
with open(sys.argv[1], 'r') as f: |
||||
for l in f: |
||||
l = l.rstrip() |
||||
print(l.replace(sys.argv[2], sys.argv[3])) |
@ -1 +1,21 @@ |
||||
objlib = static_library('object', 'source.c', override_options : ['unity=off']) |
||||
gen_py = find_program('gen.py') |
||||
ctsrc = custom_target('custom_target sources', |
||||
output: 'ct-source.c', |
||||
input: 'source.c', |
||||
command: [ gen_py, '@INPUT@', 'func1', 'func2' ], capture: true) |
||||
|
||||
gen = generator(gen_py, arguments: ['@INPUT@', 'func1', 'func3'], |
||||
output: 'gen-@PLAINNAME@', |
||||
capture: true) |
||||
gensrc = gen.process('source.c') |
||||
|
||||
|
||||
gen = generator(gen_py, arguments: ['@INPUT@', 'func1', 'func4'], |
||||
output: 'gen-@PLAINNAME@', |
||||
capture: true) |
||||
sublibsrc = gen.process('source.c') |
||||
subobjlib = static_library('subobject', sublibsrc) |
||||
|
||||
objlib = static_library('object', 'source.c', ctsrc, gensrc, |
||||
objects: subobjlib.extract_all_objects(recursive: false), |
||||
override_options : ['unity=off']) |
||||
|
Loading…
Reference in new issue