I guess you are on Windows, like me. Apparently the code that deals with the defines does not work correctly in all files on this platform, it might be related to line endings. If you look at the lines with errors they will have something like
#define UNITY_GE4#defineUNITY_GE4
In other works, some defines will be repeated, sometimes 3 or 4 times. To solve it just edit so there is only one define in the line, like
#define UNITY_GE4
And it will compile again.
Notice that UNITY_GE4 is just an example, the actual repeated define is different for every file/error.
Ouch, I haven’t seen that before…
I think I should just scrap that whole script and just modify the player build settings instead now that Unity has support for that (it was a huge pain to write that script in the first place, and it is mostly lots of regexes so I am not really surprised that it breaks in some cases).