parent
92187501ed
commit
9f9f73fa52
6 changed files with 27 additions and 2 deletions
@ -0,0 +1,5 @@ |
||||
project('postconf script', 'c') |
||||
|
||||
meson.add_postconf_script('postconf.py', args: ['5', '33']) |
||||
|
||||
test('post', executable('prog', 'prog.c')) |
@ -0,0 +1,13 @@ |
||||
#!/usr/bin/env python3 |
||||
|
||||
import sys, os |
||||
|
||||
template = '''#pragma once |
||||
|
||||
#define THE_NUMBER {} |
||||
#define THE_ARG1 {} |
||||
#define THE_ARG2 {} |
||||
''' |
||||
|
||||
data = open(os.path.join(sys.argv[1], 'raw.dat')).readline().strip() |
||||
open(os.path.join(sys.argv[2], 'generated.h'), 'w').write(template.format(data, sys.argv[3], sys.argv[4])) |
@ -0,0 +1,5 @@ |
||||
#include"generated.h" |
||||
|
||||
int main(int argc, char **argv) { |
||||
return THE_NUMBER != 9 || THE_ARG1 != 5 || THE_ARG2 != 33; |
||||
} |
@ -0,0 +1 @@ |
||||
9 |
Loading…
Reference in new issue