Skip to content

Commit 3c7e33a

Browse files
authored
Merge pull request #4866 from zw3rk/feature/header-from-buildpref
Look for install includes in buildpref as well
2 parents 2d97ee4 + 6788784 commit 3c7e33a

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

Cabal/Distribution/Simple/Install.hs

+5-4
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ copyComponent verbosity pkg_descr lbi (CLib lib) clbi copydest = do
171171

172172
-- install include files for all compilers - they may be needed to compile
173173
-- haskell files (using the CPP extension)
174-
installIncludeFiles verbosity lib incPref
174+
installIncludeFiles verbosity lib buildPref incPref
175175

176176
case compilerFlavor (compiler lbi) of
177177
GHC -> GHC.installLib verbosity lbi libPref dynlibPref buildPref pkg_descr lib clbi
@@ -247,11 +247,12 @@ installDataFiles verbosity pkg_descr destDataDir =
247247

248248
-- | Install the files listed in install-includes for a library
249249
--
250-
installIncludeFiles :: Verbosity -> Library -> FilePath -> IO ()
251-
installIncludeFiles verbosity lib destIncludeDir = do
250+
installIncludeFiles :: Verbosity -> Library -> FilePath -> FilePath -> IO ()
251+
installIncludeFiles verbosity lib buildPref destIncludeDir = do
252252
let relincdirs = "." : filter isRelative (includeDirs lbi)
253253
lbi = libBuildInfo lib
254-
incs <- traverse (findInc relincdirs) (installIncludes lbi)
254+
incdirs = relincdirs ++ [ buildPref </> dir | dir <- relincdirs ]
255+
incs <- traverse (findInc incdirs) (installIncludes lbi)
255256
sequence_
256257
[ do createDirectoryIfMissingVerbose verbosity True destDir
257258
installOrdinaryFile verbosity srcFile destFile

Cabal/changelog

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
-*-change-log-*-
22

33
2.2.0.0 (current development version)
4+
* `copyCompomenti` and `installIncludeFiles` will look for include
5+
headers in the build preference dir ('dist/build/...' by default)
6+
as well.
47
* Added cxx-options and cxx-sources build info fields for seperate
58
compilation of C++ source files (#3700)
69
* Remove unused '--allow-newer'/'--allow-older' support (#4527)

0 commit comments

Comments
 (0)