@@ -62,11 +62,13 @@ generateBuildModule flags pkg lbi = do
62 let includeArgs = map ("-I"++) $ includeDirs libBI
62 let includeArgs = map ("-I"++) $ includeDirs libBI
64 -- CPP includes, i.e. include cabal_macros.h
64 -- CPP includes, i.e. include cabal_macros.h
65+ let cppFlags = map ("-optP"++) $
65− let cppFlags = [ "-optP-include", "-optP" ++ libAutogenDir ++ "/cabal_macros.h" ]
66+ [ "-include", libAutogenDir ++ "/cabal_macros.h" ]
67 -- Actually we need to check whether testName suite == "doctests"
69 -- Actually we need to check whether testName suite == "doctests"
68 -- pending https://github.com/haskell/cabal/pull/4229 getting into GHC HEAD tree
70 -- pending https://github.com/haskell/cabal/pull/4229 getting into GHC HEAD tree
69− withTestLBI pkg lbi $ \suite suitecfg -> when (testName suite == testName suite) $ do
71+ withTestLBI pkg lbi $ \suite suitecfg -> when (testName suite == "doctests") $ do
71 -- get and create autogen dir
73 -- get and create autogen dir
72#if MIN_VERSION_Cabal(1,25,0)
74#if MIN_VERSION_Cabal(1,25,0)