To reset the build number you should just have to delete the build.number file at the top of your project.
Regarding the error you have, could you check there is spaces around the brackets and exclamation marks? Also why are you using the ‘-r’ option when starting make?
Which version of System Workbench for STM32 are you using?
I’ve tested this on a v2.0 install and it works correctly.