Commit add62721 authored by ijones's avatar ijones
Browse files

tried to fix file permissions bug some more

parent fb6f7ce6
......@@ -91,9 +91,7 @@ import Compat.Exception (bracket)
import System.Environment
import System.Directory
import Foreign.Marshal (allocaBytes)
#ifndef mingw32_TARGET_OS
import System.Posix.Files (getFileStatus, accessTime, modificationTime, setFileTimes, fileMode, setFileMode)
#endif
#ifdef DEBUG
import HUnit ((~:), (~=?), Test(..), assertEqual)
......@@ -387,15 +385,9 @@ pathJoin :: [String] -> FilePath
pathJoin = concat . intersperse pathSeparatorStr
copyPermissions :: FilePath -> FilePath -> IO ()
#ifndef mingw32_TARGET_OS
copyPermissions src dest
= do srcStatus <- getFileStatus src
setFileMode dest (fileMode srcStatus)
#else
copyPermissions src dest
= return ()
#endif
copyFileTimes :: FilePath -> FilePath -> IO ()
#ifndef mingw32_TARGET_OS
......
......@@ -3,6 +3,9 @@ PREF=/usr/local
USER_FLAG =
GHCPKGFLAGS =
# Comment out this line if your system doesn't have System.Posix.
ISPOSIX=-DHAVE_UNIX_PACKAGE
ifdef user
USER_FLAG = --user
GHCPKGFLAGS = -f ~/.ghc-packages
......@@ -99,7 +102,7 @@ hunitInstall-stamp: hunit-stamp
moduleTest:
mkdir -p dist/debug
ghc $(GHCFLAGS) -DDEBUG -odir dist/debug -hidir dist/debug -idist/debug/:.:test/HUnit-1.0/src Distribution/ModuleTest -o moduleTest
ghc $(GHCFLAGS) $(ISPOSIX) -DDEBUG -odir dist/debug -hidir dist/debug -idist/debug/:.:test/HUnit-1.0/src Distribution/ModuleTest -o moduleTest
tests: moduleTest clean
cd test/A && make clean
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment