Partially confirmed on rev1906 (see below).
I've also found that if the project name is changed in memory, and even if the project file is then saved, the macro does not register the change. However, the bug is not consistent, and I haven't been able to find rhyme or reason to when it gets the macro right or wrong. Usually, it works if I close and re-open the project file, but sometimes it even works right away.
While we're on this subject, why are so few macros available in the Tools dialog? I, for one, would really like to have at least EXE_OUTPUT available, as well as TARGET_NAME, OUTPUT_PATH, and maybe similar output-related macros that are currently available to the advanced compiler options. (Obviously these would have to be adapted slightly, but at least target-specific options such as target output and output path should be implemented IMHO.)