summaryrefslogtreecommitdiff
path: root/test cases/native/8 external program shebang parsing/meson.build
blob: c1cc5af9da8a0f5a46fa8b9aa88d21d190f3a06d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
project('shebang parsing', 'c')

interpreter = executable('aninterp', 'main.c', native : true)

cdata = configuration_data()
cdata.set('INTRP', interpreter.full_path())

f = configure_file(input : 'script.int.in',
                   output : 'script.int',
                   configuration : cdata)

# Test that parsing a shebang with spaces works properly. See `man execve`,
# specifically the section on "Interpreter scripts" and the one under "NOTES".
script = find_program(f)

custom_target('interpthis',
  input : 'input.txt',
  output : 'output.txt',
  depends : interpreter,
  command : [script, '@INPUT@', '@OUTPUT@'],
  build_by_default : true)