summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
Diffstat (limited to 'Build')
-rw-r--r--Build/DesktopFile.hs3
-rw-r--r--Build/DistributionUpdate.hs2
-rw-r--r--Build/EvilSplicer.hs2
-rw-r--r--Build/LinuxMkLibs.hs6
-rw-r--r--Build/OSXMkLibs.hs2
5 files changed, 7 insertions, 8 deletions
diff --git a/Build/DesktopFile.hs b/Build/DesktopFile.hs
index 5eab68756..6a5838f81 100644
--- a/Build/DesktopFile.hs
+++ b/Build/DesktopFile.hs
@@ -22,7 +22,6 @@ import Assistant.Install.Menu
import Control.Applicative
import System.Directory
import System.Environment
-import System.FilePath
#ifndef mingw32_HOST_OS
import System.Posix.User
#endif
@@ -76,6 +75,6 @@ install command = do
( return ()
, do
programfile <- inDestDir =<< programFile
- createDirectoryIfMissing True (takeDirectory programfile)
+ createDirectoryIfMissing True (parentDir programfile)
writeFile programfile command
)
diff --git a/Build/DistributionUpdate.hs b/Build/DistributionUpdate.hs
index 411121568..6ebe08fb0 100644
--- a/Build/DistributionUpdate.hs
+++ b/Build/DistributionUpdate.hs
@@ -64,7 +64,7 @@ getbuild repodir (url, f) = do
let dest = repodir </> f
let tmp = dest ++ ".tmp"
nukeFile tmp
- createDirectoryIfMissing True (takeDirectory dest)
+ createDirectoryIfMissing True (parentDir dest)
let oops s = do
nukeFile tmp
putStrLn $ "*** " ++ s
diff --git a/Build/EvilSplicer.hs b/Build/EvilSplicer.hs
index 81d4e37c7..fc41c624f 100644
--- a/Build/EvilSplicer.hs
+++ b/Build/EvilSplicer.hs
@@ -204,7 +204,7 @@ applySplices destdir imports splices@(first:_) = do
let f = splicedFile first
let dest = (destdir </> f)
lls <- map (++ "\n") . lines <$> readFileStrictAnyEncoding f
- createDirectoryIfMissing True (takeDirectory dest)
+ createDirectoryIfMissing True (parentDir dest)
let newcontent = concat $ addimports $ expand lls splices
oldcontent <- catchMaybeIO $ readFileStrictAnyEncoding dest
when (oldcontent /= Just newcontent) $ do
diff --git a/Build/LinuxMkLibs.hs b/Build/LinuxMkLibs.hs
index f3a7c3b2e..1ca2fa651 100644
--- a/Build/LinuxMkLibs.hs
+++ b/Build/LinuxMkLibs.hs
@@ -47,7 +47,7 @@ mklibs top = do
writeFile (top </> "linker")
(Prelude.head $ filter ("ld-linux" `isInfixOf`) libs')
writeFile (top </> "gconvdir")
- (takeDirectory $ Prelude.head $ filter ("/gconv/" `isInfixOf`) glibclibs)
+ (parentDir $ Prelude.head $ filter ("/gconv/" `isInfixOf`) glibclibs)
mapM_ (installLinkerShim top) exes
@@ -75,7 +75,7 @@ installLinkerShim top exe = do
symToHardLink :: FilePath -> IO ()
symToHardLink f = whenM (isSymbolicLink <$> getSymbolicLinkStatus f) $ do
l <- readSymbolicLink f
- let absl = absPathFrom (takeDirectory f) l
+ let absl = absPathFrom (parentDir f) l
nukeFile f
createLink absl f
@@ -84,7 +84,7 @@ installFile top f = do
createDirectoryIfMissing True destdir
void $ copyFileExternal CopyTimeStamps f destdir
where
- destdir = inTop top $ takeDirectory f
+ destdir = inTop top $ parentDir f
checkExe :: FilePath -> IO Bool
checkExe f
diff --git a/Build/OSXMkLibs.hs b/Build/OSXMkLibs.hs
index 57f74f0e0..ef668bb4a 100644
--- a/Build/OSXMkLibs.hs
+++ b/Build/OSXMkLibs.hs
@@ -50,7 +50,7 @@ installLibs appbase replacement_libs libmap = do
ifM (doesFileExist dest)
( return Nothing
, do
- createDirectoryIfMissing True (takeDirectory dest)
+ createDirectoryIfMissing True (parentDir dest)
putStrLn $ "installing " ++ pathlib ++ " as " ++ shortlib
_ <- boolSystem "cp" [File pathlib, File dest]
_ <- boolSystem "chmod" [Param "644", File dest]