summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-04-14 14:22:33 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-04-14 14:22:33 -0400
commit626697b459669d934da6339117f6f4abfce16f38 (patch)
tree00b7a7b2bdac27ea572501d8f3b04d612929c4a9
parent1ca41044e8fab2b2e859a482e2293582c04db81f (diff)
cabal file now autodetects whether S3 support is available.
-rw-r--r--Locations.hs2
-rw-r--r--Makefile2
-rw-r--r--Remote/List.hs4
-rw-r--r--debian/changelog1
-rw-r--r--git-annex.cabal10
5 files changed, 16 insertions, 3 deletions
diff --git a/Locations.hs b/Locations.hs
index d263f3d2a..67abf2166 100644
--- a/Locations.hs
+++ b/Locations.hs
@@ -124,7 +124,7 @@ gitAnnexBadDir r = addTrailingPathSeparator $ gitAnnexDir r </> "bad"
gitAnnexBadLocation :: Key -> Git.Repo -> FilePath
gitAnnexBadLocation key r = gitAnnexBadDir r </> keyFile key
-{- .git/annex/*unused is used to number possibly unused keys -}
+{- .git/annex/foounused is used to number possibly unused keys -}
gitAnnexUnusedLog :: FilePath -> Git.Repo -> FilePath
gitAnnexUnusedLog prefix r = gitAnnexDir r </> (prefix ++ "unused")
diff --git a/Makefile b/Makefile
index eb30a3833..87aa8c076 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
PREFIX=/usr
IGNORE=-ignore-package monads-fd
-BASEFLAGS=-Wall $(IGNORE) -outputdir tmp -IUtility
+BASEFLAGS=-Wall $(IGNORE) -outputdir tmp -IUtility -cpp -DWITH_S3
GHCFLAGS=-O2 $(BASEFLAGS)
ifdef PROFILE
diff --git a/Remote/List.hs b/Remote/List.hs
index 57dfa43eb..c09341fb5 100644
--- a/Remote/List.hs
+++ b/Remote/List.hs
@@ -18,7 +18,9 @@ import Config
import Remote.Helper.Hooks
import qualified Remote.Git
+#ifdef WITH_S3
import qualified Remote.S3
+#endif
import qualified Remote.Bup
import qualified Remote.Directory
import qualified Remote.Rsync
@@ -28,7 +30,9 @@ import qualified Remote.Hook
remoteTypes :: [RemoteType]
remoteTypes =
[ Remote.Git.remote
+#ifdef WITH_S3
, Remote.S3.remote
+#endif
, Remote.Bup.remote
, Remote.Directory.remote
, Remote.Rsync.remote
diff --git a/debian/changelog b/debian/changelog
index 73b4f31b0..7b9fcde3f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,7 @@ git-annex (3.20120407) UNRELEASED; urgency=low
dependency on the haskell edit-distance library.
* Renamed diskfree.c to avoid OSX case insensativity bug.
* cabal now installs git-annex-shell as a symlink to git-annex.
+ * cabal file now autodetects whether S3 support is available.
-- Joey Hess <joeyh@debian.org> Sun, 08 Apr 2012 12:23:42 -0400
diff --git a/git-annex.cabal b/git-annex.cabal
index 6b1ebb42e..58370daf4 100644
--- a/git-annex.cabal
+++ b/git-annex.cabal
@@ -26,15 +26,23 @@ Description:
etc that are associated with annexed files but that benefit from full
revision control.
+Flag S3
+ Description: Enable S3 support
+
Executable git-annex
Main-Is: git-annex.hs
Build-Depends: MissingH, hslogger, directory, filepath,
unix, containers, utf8-string, network, mtl, bytestring, old-locale, time,
- pcre-light, extensible-exceptions, dataenc, SHA, process, hS3, json, HTTP,
+ pcre-light, extensible-exceptions, dataenc, SHA, process, json, HTTP,
base >= 4.5, base < 5, monad-control, transformers-base, lifted-base,
IfElse, text, QuickCheck >= 2.1, bloomfilter, edit-distance
Other-Modules: Utility.Touch
C-Sources: Utility/libdiskfree.c
+ Extensions: CPP
+
+ if flag(S3)
+ Build-Depends: hS3
+ CPP-Options: -DWITH_S3
Test-Suite test
Type: exitcode-stdio-1.0