avoid hsc files on Windows
This used to work, but now hsc2hs is failing with a usage message. Since I have not changed my windows build environment at all, it must be some change due to a change in the cabal file. Perhaps too make flags are causing it to hit a windows command line length limit? Anyway, these hsc files did nothing on Windows, so can be omitted and not built to work around yet another epic windows weirdness.
This commit is contained in:
parent
c02bc07ce0
commit
158ba9d332
3 changed files with 17 additions and 5 deletions
|
@ -24,8 +24,10 @@ import Annex.Link
|
||||||
import qualified Annex
|
import qualified Annex
|
||||||
import qualified Annex.Queue
|
import qualified Annex.Queue
|
||||||
#ifndef __ANDROID__
|
#ifndef __ANDROID__
|
||||||
|
#ifdef WTTH_CLIBS
|
||||||
import Utility.Touch
|
import Utility.Touch
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
import Utility.FileMode
|
import Utility.FileMode
|
||||||
import Config
|
import Config
|
||||||
import Utility.InodeCache
|
import Utility.InodeCache
|
||||||
|
@ -206,11 +208,13 @@ link file key mcache = flip catchAnnex (undo file key) $ do
|
||||||
replaceFile file $ makeAnnexLink l
|
replaceFile file $ makeAnnexLink l
|
||||||
|
|
||||||
#ifndef __ANDROID__
|
#ifndef __ANDROID__
|
||||||
|
#ifdef WITH_CLIBS
|
||||||
-- touch symlink to have same time as the original file,
|
-- touch symlink to have same time as the original file,
|
||||||
-- as provided in the InodeCache
|
-- as provided in the InodeCache
|
||||||
case mcache of
|
case mcache of
|
||||||
Just c -> liftIO $ touch file (TimeSpec $ inodeCacheToMtime c) False
|
Just c -> liftIO $ touch file (TimeSpec $ inodeCacheToMtime c) False
|
||||||
Nothing -> noop
|
Nothing -> noop
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return l
|
return l
|
||||||
|
|
|
@ -15,8 +15,10 @@ import Common.Annex
|
||||||
import Command
|
import Command
|
||||||
import qualified Annex.Queue
|
import qualified Annex.Queue
|
||||||
#ifndef __ANDROID__
|
#ifndef __ANDROID__
|
||||||
|
#ifdef WITH_CLIBS
|
||||||
import Utility.Touch
|
import Utility.Touch
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
def :: [Command]
|
def :: [Command]
|
||||||
def = [notDirect $ noCommit $ command "fix" paramPaths seek
|
def = [notDirect $ noCommit $ command "fix" paramPaths seek
|
||||||
|
@ -37,15 +39,19 @@ perform :: FilePath -> FilePath -> CommandPerform
|
||||||
perform file link = do
|
perform file link = do
|
||||||
liftIO $ do
|
liftIO $ do
|
||||||
#ifndef __ANDROID__
|
#ifndef __ANDROID__
|
||||||
|
#ifdef WITH_CLIBS
|
||||||
-- preserve mtime of symlink
|
-- preserve mtime of symlink
|
||||||
mtime <- catchMaybeIO $ TimeSpec . modificationTime
|
mtime <- catchMaybeIO $ TimeSpec . modificationTime
|
||||||
<$> getSymbolicLinkStatus file
|
<$> getSymbolicLinkStatus file
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
createDirectoryIfMissing True (parentDir file)
|
createDirectoryIfMissing True (parentDir file)
|
||||||
removeFile file
|
removeFile file
|
||||||
createSymbolicLink link file
|
createSymbolicLink link file
|
||||||
#ifndef __ANDROID__
|
#ifndef __ANDROID__
|
||||||
|
#ifdef WITH_CLIBS
|
||||||
maybe noop (\t -> touch file t False) mtime
|
maybe noop (\t -> touch file t False) mtime
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
next $ cleanup file
|
next $ cleanup file
|
||||||
|
|
||||||
|
|
|
@ -83,13 +83,8 @@ Executable git-annex
|
||||||
base (>= 4.5 && < 4.9), monad-control, MonadCatchIO-transformers,
|
base (>= 4.5 && < 4.9), monad-control, MonadCatchIO-transformers,
|
||||||
IfElse, text, QuickCheck >= 2.1, bloomfilter, edit-distance, process,
|
IfElse, text, QuickCheck >= 2.1, bloomfilter, edit-distance, process,
|
||||||
SafeSemaphore, uuid, random, dlist, unix-compat
|
SafeSemaphore, uuid, random, dlist, unix-compat
|
||||||
-- Need to list these because they're generated from .hsc files.
|
|
||||||
Other-Modules: Utility.Touch Utility.Mounts
|
|
||||||
Include-Dirs: Utility
|
|
||||||
C-Sources: Utility/libdiskfree.c Utility/libmounts.c
|
|
||||||
CC-Options: -Wall
|
CC-Options: -Wall
|
||||||
GHC-Options: -Wall
|
GHC-Options: -Wall
|
||||||
CPP-Options: -DWITH_CLIBS
|
|
||||||
Extensions: PackageImports
|
Extensions: PackageImports
|
||||||
-- Some things don't work with the non-threaded RTS.
|
-- Some things don't work with the non-threaded RTS.
|
||||||
GHC-Options: -threaded
|
GHC-Options: -threaded
|
||||||
|
@ -97,6 +92,13 @@ Executable git-annex
|
||||||
if flag(Production)
|
if flag(Production)
|
||||||
GHC-Options: -O2
|
GHC-Options: -O2
|
||||||
|
|
||||||
|
if (! os(windows))
|
||||||
|
-- hsc files
|
||||||
|
Other-Modules: Utility.Touch Utility.Mounts
|
||||||
|
Include-Dirs: Utility
|
||||||
|
C-Sources: Utility/libdiskfree.c Utility/libmounts.c
|
||||||
|
CPP-Options: -DWITH_CLIBS
|
||||||
|
|
||||||
if (! os(windows))
|
if (! os(windows))
|
||||||
Build-Depends: unix
|
Build-Depends: unix
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue