refactor preprocessor macros into a function

Remove the "macros" global and instead use a function to construct a
list of macros.
Merge branch 'master' into preprocessor-macro-function
Merge pull request #183 from kanzure/preprocessor-macro-function

Function to make the preprocessor "macros" list.