A target where all sources are generated.

pull/794/head
Jussi Pakkanen 8 years ago
parent cb2eff8440
commit 5f6c9d628d
  1. 8
      test cases/common/118 allgenerate/converter.py
  2. 6
      test cases/common/118 allgenerate/foobar.c.in
  3. 11
      test cases/common/118 allgenerate/meson.build

@ -0,0 +1,8 @@
#!/usr/bin/env python3
import sys
ifile = sys.argv[1]
ofile = sys.argv[2]
open(ofile, 'w').write(open(ifile).read())

@ -0,0 +1,6 @@
#include<stdio.h>
int main(int argc, char **argv) {
printf("I am a program.\n");
return 0;
}

@ -0,0 +1,11 @@
project('all sources generated', 'cpp')
comp = find_program('converter.py')
c = custom_target('outputfile',
input : 'foobar.c.in',
output : 'foobar.cpp',
command : [comp, '@INPUT@', '@OUTPUT@'],
)
prog = executable('genexe', c)
Loading…
Cancel
Save