Generalise PreProcessors to take more detailed args Most pre-processors just need the full source file and target file names. More complicated ones where the generated files have to embed links to each other need more information. For example c2hs generates .hs file that reference generated .h files. These links should be relative to the dist/build dir and not to the top of the source tree, since we do not want to add -I. to the includes search path. We only want to use -Idist/build, hence the embeded links must be relative to that. Therefor c2hs needs to know the base output directory as well as the name of the file relative to that. So we add a new type PreProcessorFull that has this extra info and a function simplePP :: :: PreProcessor -> PreProcessorFull for the common case of most existing pre-processors that do not need this extra info. This patch doesn't actually change the c2hs stuff, that comes next.
Generalise PreProcessors to take more detailed args
Most pre-processors just need the full source file and target file names.
More complicated ones where the generated files have to embed links to each
other need more information. For example c2hs generates .hs file that
reference generated .h files. These links should be relative to the dist/build
dir and not to the top of the source tree, since we do not want to add -I. to
the includes search path. We only want to use -Idist/build, hence the embeded
links must be relative to that. Therefor c2hs needs to know the base output
directory as well as the name of the file relative to that.
So we add a new type PreProcessorFull that has this extra info and a function
simplePP :: :: PreProcessor -> PreProcessorFull
for the common case of most existing pre-processors that do not need this
extra info.
This patch doesn't actually change the c2hs stuff, that comes next.


IreneKnapp/Faction,IreneKnapp/Faction