Looks like a contender for the obfuscated sh script contest. I have a feeling that next time I see something I don't understand in a Makefile I'll be looking at it more closely than I would've last week.
I knew that shell files, especially in build systems can get hard to read, but this was absolutely painful to look at from start to finish, even with the very helpful explanations in between.
Of course the obfuscation is mostly done by design in this case.