Function to make the preprocessor "macros" list

Remove the "macros" global and instead use a function to construct a
list of macros.