
Late reply I know, but in case you're still having trouble: On Sat, 2008-07-05 at 08:30 +0100, Dominic Steinitz wrote:
Dominic Steinitz wrote:
Ignore my previous message, it was a lot simpler than I thought it was
import Distribution.Simple import Distribution.Simple.PreProcess
main = defaultMainWithHooks defaultUserHooks { hookedPreProcessors = [("chs", ppC2hs)] }
There is no need to use a custom Setup.hs script for this. Cabal already knows that .chs files are processed by c2hs.
But now I get a build error
dom@lagrange:~/networktools/ping> ./Setup build Preprocessing executables for Ping-0.0... dist/build/ping/ping-tmp/IP_ICMP.chs.h:1:21: error: ip_icmp.h: No such file or directory c2hs: Error during preprocessing custom header file
But ip_icmp.h is there!
How do I tell cabal that ip_icmp.h is in the current directory not buried somewhere?
Use: include-dirs: . Duncan