I did read that. 
svnversion is another tool that can be used instead of 
svn info.
It is the same thing, except that 
svn info runs about 10 times faster, which is why I prefer it.
What they do in that example is nothing more but 
echo some C code into a file (with output redirection) and run 
svnversion -n in backticks during that.
This will produce a souce file with code that looks like char 
*SVN_version = "12342";There is no deep magic behind that 

The defines are another way of doing it, but are not needed if you produce the source file. I don't know about the $(shell ...) syntax, but a guess would be that you need to replace "shell" with "sh" or "bash". If it were me, I'd use the other solution, it confirmedly works without any problems.