rm does not support long-form --recursive, --force on Mac?
OSX is Unix and uses the BSD tools. The extended names are a GNU extension.

You just need to use the standard parameters e.g. -r -f 
(These are in the POSIX standard)

The error is in the build file using non standard Unix commands