1# Configure in subdir with absolute paths for input and relative for output 2configure_file(input : '../dummy.dat', 3 output : 'config2-1.h', 4 command : [genprog, scriptfile, ifile, 'config2-1.h'], 5 install_dir : 'share/appdireh') 6run_command(check_file, join_paths(meson.current_build_dir(), 'config2-1.h')) 7 8# Configure in subdir with files() for input and relative for output 9configure_file(input : '../dummy.dat', 10 output : 'config2-2.h', 11 command : [genprog, scriptfile, files('../dummy.dat'), 'config2-2.h'], 12 install_dir : 'share/appdirok') 13run_command(check_file, join_paths(meson.current_build_dir(), 'config2-2.h')) 14 15# Configure in subdir with string templates for input and output 16configure_file(input : '../dummy.dat', 17 output : 'config2-3.h', 18 command : [found_script, '@INPUT@', '@OUTPUT@']) 19run_command(check_file, join_paths(meson.current_build_dir(), 'config2-3.h')) 20 21# Test that overwriting an existing file creates a warning. 22configure_file( 23 input: '../test.py.in', 24 output: 'double_output2.txt', 25 configuration: conf 26) 27configure_file( 28 input: '../test.py.in', 29 output: 'double_output2.txt', 30 configuration: conf 31) 32 33# Test that the same file name in a different subdir will not create a warning 34configure_file( 35 input: '../test.py.in', 36 output: 'no_write_conflict.txt', 37 configuration: conf 38) 39