From ddcc51204b65e5daccea57711b6c74f12caa73ae Mon Sep 17 00:00:00 2001 From: Bruno Lopes Date: Thu, 17 Apr 2025 15:22:26 -0300 Subject: [PATCH] libgimp: Port from cat to Python --- libgimp/meson.build | 2 +- libgimp/tests/meson.build | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/libgimp/meson.build b/libgimp/meson.build index 0a71df8892..e1915765cd 100644 --- a/libgimp/meson.build +++ b/libgimp/meson.build @@ -48,7 +48,7 @@ gimpenums_notail = custom_target('gimpenums.c.notail', gimpenums = custom_target('gimpenums.c', input : [ gimpenums_notail, 'gimpenums.c.tail', ], output: [ 'gimpenums.c', ], - command: [ 'cat', '@INPUT@' ], + command: [python, '-c', 'import sys; [sys.stdout.write(open(f).read()) for f in sys.argv[1:]]','@INPUT@'], capture: true, ) diff --git a/libgimp/tests/meson.build b/libgimp/tests/meson.build index aa35db8eeb..77f0e67407 100644 --- a/libgimp/tests/meson.build +++ b/libgimp/tests/meson.build @@ -25,7 +25,6 @@ test_env.set('GIMP_TESTING_ABS_TOP_SRCDIR', meson.project_source_root()) run_python_test = find_program('./libgimp-run-python-test.sh') run_c_test = find_program('./libgimp-run-c-test.sh') -cat = find_program('cat') foreach test_name : tests basename = 'test-' + test_name @@ -40,7 +39,7 @@ foreach test_name : tests c_test = custom_target(c_test_name, input: [ 'c-test-header.c', c_test_name ], output: c_test_name, - command: [cat, '@INPUT@'], + command: [python, '-c', 'import sys; [sys.stdout.write(open(f).read()) for f in sys.argv[1:]]','@INPUT@'], capture: true, install: false) c_test_exe = executable(basename,