
Manuel M T Chakravarty
Isaac Jones wrote:
Dominic Steinitz
writes: [..] I don't use c2hs myself; is there any pattern to the .h files we might want to preprocess? Any way to derive it from the sources or the module names? I'm not sure how better to support the kind of thing you need. Explicit specification of .h files on the command line is mainly supported for backward compatibility with old versions of c2hs. The suggested way of handling this with the current c2hs is to have a "#include" in the .chs file. (This does *not* require to run cpp over the .chs file. c2hs understands and interprets cpp directives directly.)
Thanks for the info :)
It would be nice if future versions of Cabal could directly support c2hs instead of requiring explicit setting of "hookedPreProcessors". If I can help with this, let me know. In the long run, I want to change c2hs' build system over to Cabal, too.
Cabal does support c2hs directly, except that there's a slight bug (fixed in HEAD) where there's a space at the front of generated files. Using hookedPreProcessors to over-ride the built-in behavior is a workaround for this bug. peace, isaac