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
90c59d13
Commit
90c59d13
authored
Feb 07, 2016
by
Andrey Mokhov
Browse files
Copy generated files to old build directories.
See
#98
.
parent
7f2c6a1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Rules/Generate.hs
View file @
90c59d13
...
...
@@ -3,6 +3,8 @@ module Rules.Generate (
includesDependencies
,
derivedConstantsPath
,
generatedDependencies
)
where
import
qualified
System.Directory
as
IO
import
Base
import
Expression
import
GHC
...
...
@@ -144,19 +146,32 @@ generatePackageCode _ target @ (PartialTarget stage pkg) =
,
"*.hs-incl"
]
|%>
\
file
->
do
need
[
primopsTxt
stage
]
build
$
fullTarget
target
GenPrimopCode
[
primopsTxt
stage
]
[
file
]
-- TODO: this is temporary hack, get rid of this (#113)
let
oldPath
=
pkgPath
pkg
-/-
targetDirectory
stage
pkg
-/-
"build"
newFile
=
oldPath
++
(
drop
(
length
buildPath
)
file
)
createDirectory
$
takeDirectory
newFile
liftIO
$
IO
.
copyFile
file
newFile
putSuccess
$
"| Duplicate file "
++
file
++
" -> "
++
newFile
when
(
pkg
==
rts
)
$
buildPath
-/-
"AutoApply.cmm"
%>
\
file
->
do
build
$
fullTarget
target
GenApply
[]
[
file
]
priority
2.0
$
do
-- TODO: this is temporary hack, get rid of this (#113)
let
oldPath
=
pkgPath
pkg
-/-
targetDirectory
stage
pkg
-/-
"build"
olden
f
=
oldPath
++
(
drop
(
length
buildPath
)
f
)
when
(
pkg
==
compiler
)
$
buildPath
-/-
"Config.hs"
%>
\
file
->
do
file
<~
generateConfigHs
olden
file
<~
generateConfigHs
-- TODO: get rid of this (#113)
when
(
pkg
==
compiler
)
$
platformH
stage
%>
\
file
->
do
file
<~
generateGhcBootPlatformH
olden
file
<~
generateGhcBootPlatformH
-- TODO: get rid of this (#113)
when
(
pkg
==
ghcPkg
)
$
buildPath
-/-
"Version.hs"
%>
\
file
->
do
file
<~
generateVersionHs
olden
file
<~
generateVersionHs
-- TODO: get rid of this (#113)
when
(
pkg
==
runGhc
)
$
buildPath
-/-
"Main.hs"
%>
\
file
->
do
copyFileChanged
(
pkgPath
pkg
-/-
"runghc.hs"
)
file
...
...
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