Skip to content

Commit

Permalink
Merge pull request #412 from hesselink/include-dirs
Browse files Browse the repository at this point in the history
Add include-dirs from cabal file to GHC call.
  • Loading branch information
chrisdone committed Jun 25, 2015
2 parents d5a776c + d9ec259 commit 711f2e9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Stack/Package.hs
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ generatePkgDescOpts cabalfp pkg = do
-- | Generate GHC options for the target.
generateBuildInfoOpts :: Maybe (Path Abs File) -> Path Abs Dir -> Path Abs Dir -> BuildInfo -> [String]
generateBuildInfoOpts mcabalmacros cabalDir distDir b =
nub (concat [ghcOpts b, extOpts b, srcOpts, macros, deps])
nub (concat [ghcOpts b, extOpts b, srcOpts, includeOpts b, macros, deps])
where
deps =
concat
Expand All @@ -314,6 +314,10 @@ generateBuildInfoOpts mcabalmacros cabalDir distDir b =
(cabalDir :
map (cabalDir </>) (mapMaybe parseRelDir (hsSourceDirs b)) <>
[autogenDir distDir])
includeOpts
= map (("-I" <>) . toFilePath . (cabalDir </>))
. mapMaybe parseRelDir
. includeDirs

-- | Make the autogen dir.
autogenDir :: Path Abs Dir -> Path Abs Dir
Expand Down

0 comments on commit 711f2e9

Please sign in to comment.