On Jul 26, 2007, at 7:02 AM, Neil Mitchell wrote:
I haven't tried, but doesn't this already work if you set the CPP
environment variable to cpphs before running configure? You might
also
need to set CPPFLAGS to something.
If you pass the --cpp flag then cpphs works like GHC expects,
otherwise it has a different set of flags.
It has a really cool set of flags (--layout in particular). The one
thing I have to do is grab the system INCLUDE search path because it
does not set that path for each platform. For "regular" -cpp, where
GHC expects to have C-compiler defines (i.e., _MSC_VER), I still have
to use the C compiler but that does not present the same problems as
using the "raw" -cpp for Haskell code. Also, without the '-cpp' flag
cpphs seems to 'open' (as in fopen()) the operand to '-I'. If I use
'cpphs -I../includes' it will fail because it is 'unable to open
file'. With '-cpp' this does not happen.
By the way, it is done, as far as using cpphs as a separate program.
I will look into using cpphs as a library once I have finished
building stage2.
Cheers,
Pete
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc