Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Look for install includes in buildpref as well #4866

Merged
merged 3 commits into from
Nov 8, 2017
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions Cabal/Distribution/Simple/Install.hs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ copyComponent verbosity pkg_descr lbi (CLib lib) clbi copydest = do

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

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

-- | Install the files listed in install-includes for a library
--
installIncludeFiles :: Verbosity -> Library -> FilePath -> IO ()
installIncludeFiles verbosity lib destIncludeDir = do
installIncludeFiles :: Verbosity -> Library -> FilePath -> FilePath -> IO ()
installIncludeFiles verbosity lib buildPref destIncludeDir = do
let relincdirs = "." : filter isRelative (includeDirs lbi)
lbi = libBuildInfo lib
incs <- traverse (findInc relincdirs) (installIncludes lbi)
incdirs = relincdirs ++ [ buildPref </> dir | dir <- relincdirs ]
incs <- traverse (findInc incdirs) (installIncludes lbi)
sequence_
[ do createDirectoryIfMissingVerbose verbosity True destDir
installOrdinaryFile verbosity srcFile destFile
Expand Down
2 changes: 2 additions & 0 deletions Cabal/changelog
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
-*-change-log-*-

2.2.0.0 (current development version)
* `copyCompoment` and `installIncludeFiles` will look for include
headers in the build preference as well.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should say what the default build preference dir is, i.e.:

... will look for include headers in the build preference dir ('dist/build/...' by default) as well.

* Added cxx-options and cxx-sources build info fields for seperate
compilation of C++ source files (#3700)
* Remove unused '--allow-newer'/'--allow-older' support (#4527)
Expand Down