Add #elif support and some fixes. Reviewed by: @vladislavbelov Differential Revision: https://code.wildfiregames.com/D2456 This was SVN commit r23404.
Reviewed by: @Angen Comments by: @elexis Differential Revision: https://code.wildfiregames.com/D2338 This was SVN commit r23215.