/bin/sh: -c: line 0: syntax error near unexpected token `('
This was reported to ST through the support forums. It seems to be a problem with CubeMX 4.18 when it generates projects for SW4STM32.
See https://community.st.com/thread/34183-stm32cubemx-4180-bug-in-cproject for more information.
Andrei from The Great White North.