Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
5d2cf2c3
Commit
5d2cf2c3
authored
Jan 13, 2015
by
Andrey Mokhov
Browse files
Add toStandard to varios places.
parent
821776b9
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Package/Base.hs
View file @
5d2cf2c3
...
...
@@ -84,7 +84,8 @@ bootPkgConstraints = mempty
-- sed "s/[^0-9.]//g")"))
pathArgs
::
ShowArgs
a
=>
String
->
FilePath
->
a
->
Args
pathArgs
key
path
as
=
map
(
\
a
->
key
++
normaliseEx
(
path
</>
a
))
<$>
arg
as
pathArgs
key
path
as
=
map
(
\
a
->
key
++
toStandard
(
normaliseEx
$
path
</>
a
))
<$>
arg
as
packageArgs
::
Stage
->
FilePath
->
Args
packageArgs
stage
pkgData
=
do
...
...
@@ -100,14 +101,14 @@ packageArgs stage pkgData = do
includeArgs
::
FilePath
->
FilePath
->
Args
includeArgs
path
dist
=
let
pkgData
=
path
</>
dist
</>
"package-data.mk"
buildDir
=
path
</>
dist
</>
"build"
let
pkgData
=
toStandard
$
path
</>
dist
</>
"package-data.mk"
buildDir
=
toStandard
$
path
</>
dist
</>
"build"
in
arg
"-i"
<>
pathArgs
"-i"
path
(
SrcDirs
pkgData
)
<>
concatArgs
[
"-i"
,
"-I"
]
[
buildDir
,
buildDir
</>
"autogen"
]
<>
concatArgs
[
"-i"
,
"-I"
]
[
buildDir
,
toStandard
$
buildDir
</>
"autogen"
]
<>
pathArgs
"-I"
path
(
IncludeDirs
pkgData
)
<>
arg
"-optP-include"
-- TODO: Shall we also add -cpp?
<>
concatArgs
"-optP"
(
buildDir
</>
"autogen/cabal_macros.h"
)
<>
concatArgs
"-optP"
(
toStandard
$
buildDir
</>
"autogen/cabal_macros.h"
)
pkgHsSources
::
FilePath
->
FilePath
->
Action
[
FilePath
]
pkgHsSources
path
dist
=
do
...
...
src/Package/Dependencies.hs
View file @
5d2cf2c3
...
...
@@ -5,16 +5,16 @@ import Package.Base
buildPackageDependencies
::
Package
->
TodoItem
->
Rules
()
buildPackageDependencies
(
Package
name
path
_
)
(
stage
,
dist
,
settings
)
=
let
buildDir
=
path
</>
dist
</>
"build"
pkgData
=
path
</>
dist
</>
"package-data.mk"
let
buildDir
=
toStandard
$
path
</>
dist
</>
"build"
pkgData
=
toStandard
$
path
</>
dist
</>
"package-data.mk"
in
(
buildDir
</>
name
<.>
"m"
)
%>
\
out
->
do
need
[
"shake/src/Package/Dependencies.hs"
]
terseRun
(
Ghc
stage
)
$
arg
"-M"
<>
packageArgs
stage
pkgData
<>
includeArgs
path
dist
<>
productArgs
[
"-odir"
,
"-stubdir"
]
buildDir
<>
arg
[
"-dep-makefile"
,
out
<.>
"new"
]
<>
productArgs
[
"-odir"
,
"-stubdir"
,
"-hidir"
]
buildDir
<>
arg
[
"-dep-makefile"
,
toStandard
$
out
<.>
"new"
]
<>
productArgs
"-dep-suffix"
(
map
wayPrefix
<$>
ways
settings
)
<>
arg
(
pkgHsSources
path
dist
)
-- TODO: Check that skipping all _HC_OPTS is safe.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment