Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
5138ff53
Commit
5138ff53
authored
Jun 17, 2004
by
ijones
Browse files
fixed up sdist a bit
** fixed bug in SDist where it wasn't looking in the hsSourceDir ** cleaned up a little
parent
249451c9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Distribution/Simple/Install.hs
View file @
5138ff53
...
...
@@ -102,7 +102,7 @@ installHugs pref buildPref pkg_descr
mkImportDir
::
PackageDescription
->
LocalBuildInfo
->
FilePath
mkImportDir
pkg_descr
lbi
=
#
ifdef
mingw32_TARGET_OS
pathJoin
[
prefix
lbi
,
pkg_name
pathJoin
[
prefix
lbi
,
pkg_name
]
#
else
pathJoin
[
prefix
lbi
,
"lib"
,
pkg_name
]
#
endif
...
...
Distribution/Simple/SrcDist.hs
View file @
5138ff53
...
...
@@ -61,19 +61,26 @@ import HUnit (Test)
-- |Create a source distribution. FIX: Calls tar directly (won't work
-- on windows).
sdist
::
FilePath
-- ^build prefix
sdist
::
FilePath
-- ^build prefix
(temp dir)
->
FilePath
-- ^TargetPrefix
->
PackageDescription
->
LocalBuildInfo
->
IO
()
sdist
srcPref
targetPref
pkg_descr
_
=
do
sdist
tmpDir
targetPref
pkg_descr
@
PackageDescription
{
allModules
=
mods
,
mainModules
=
mainMods
,
hsSourceDir
=
srcDir
}
_
=
do
setupMessage
"Building source dist for"
pkg_descr
ex
<-
doesDirectoryExist
srcPref
when
ex
(
die
$
"Source distribution already in place. please move: "
++
srcPref
)
moveSources
""
(
pathJoin
[
srcPref
,
nameVersion
pkg_descr
])
(
allModules
pkg_descr
)
(
mainModules
pkg_descr
)
[
"lhs"
,
"hs"
]
system
$
"tar --directory="
++
srcPref
++
" -zcf "
++
ex
<-
doesDirectoryExist
tmpDir
let
tmpLoc1
=
pathJoin
[
tmpDir
,
nameVersion
pkg_descr
,
srcDir
]
let
tmpLoc2
=
pathJoin
[
tmpDir
,
nameVersion
pkg_descr
]
when
ex
(
die
$
"Source distribution already in place. please move: "
++
tmpDir
)
moveSources
srcDir
tmpLoc1
mods
mainMods
[
"lhs"
,
"hs"
]
moveSources
""
tmpLoc2
[
"Setup"
]
[]
[
"lhs"
,
"hs"
]
system
$
"tar --directory="
++
tmpDir
++
" -zcf "
++
(
pathJoin
[
targetPref
,
tarBallName
pkg_descr
])
++
" "
++
(
nameVersion
pkg_descr
)
system
$
"rm -rf "
++
srcPref
system
$
"rm -rf "
++
tmpDir
putStrLn
"Source tarball created."
------------------------------------------------------------
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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