Fix profiling builds

The attached fixes make it possible to do profiling builds through ghc-parmake, and also address a few other errors.

Note: We should really change the way that parsing is done in the future, I am pretty sure that will break a lot (and does so silently).

I think we should write a proper parser for these Makefiles (I think they are always `file : file`, so maybe we don't need any change, but need to check), and fail loudly when they don't parse.