meson.build 653 B

12345678910111213141516171819202122
  1. project('shebang parsing', 'c')
  2. interpreter = executable('aninterp', 'main.c', native : true)
  3. cdata = configuration_data()
  4. cdata.set('INTRP', interpreter.full_path())
  5. f = configure_file(input : 'script.int.in',
  6. output : 'script.int',
  7. configuration : cdata)
  8. # Test that parsing a shebang with spaces works properly. See `man execve`,
  9. # specifically the section on "Interpreter scripts" and the one under "NOTES".
  10. script = find_program(f)
  11. custom_target('interpthis',
  12. input : 'input.txt',
  13. output : 'output.txt',
  14. depends : interpreter,
  15. command : [script, '@INPUT@', '@OUTPUT@'],
  16. build_by_default : true)