I'm having a problem running ar command on Linux with ASTERISK *.o
in command
of custom_target
.
When running this command:
target_build_cmd = [
'ar', '-qcs', '/home/bassem/meson/lib.a', meson.project_build_root() + '/tmp/*.o',
]
target_dma_lib = custom_target (
'target_lib',
output: lib.a,
build_by_default: true,
command: target_build_cmd,
)
I get error:
/usr/bin/ar -qcs /home/bassem/meson/lib.a '/home/bassem/meson/crono_dma_driver/tools/meson/bf5/tmp/*.o' /usr/bin/ar: /home/bassem/meson/tmp/*.o: No such file or directory
It appends single quote for an unknown reason. While, when I run the command manually without the single quote it works:
ar -qcs /home/bassem/meson/lib.a /home/bassem/meson/crono_dma_driver/tools/meson/bf5/tmp/*.o
Also, when I write one of the files instead of ASTRISK it works, e.g.
target_build_cmd = [
'ar', '-qcs', '/home/bassem/meson/lib.a', meson.project_build_root() + '/tmp/sysfs.o',
]
I tried to use unicode escape /tmp/\N{ASTERISK}.o
, got the same error.
How to pass *.o
in the command?
meson version: 0.60.3
Linux: 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux