summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-11-25 13:01:53 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-11-25 13:01:53 -0400
commit33f76f48d0698300460d15b92a339c10101dc8e6 (patch)
treedb2c61448d58ee8defc25a7890ba7417b823aec1
parent1378f231d9a52c0dcb4b35a44fdc16a4b9020cb2 (diff)
ensure that Android TH splice is expanded in native side of build
-rw-r--r--Makefile2
-rw-r--r--git-annex.cabal10
2 files changed, 9 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index ed3c93325..9c2d2d380 100644
--- a/Makefile
+++ b/Makefile
@@ -173,7 +173,7 @@ ANDROID_FLAGS?=-f-XMPP
# Uses https://github.com/neurocyte/ghc-android
android: Build/EvilSplicer
echo "Running native build, to get TH splices.."
- if [ ! -e dist/setup/setup ]; then $(CABAL) configure -f-Production -O0 $(ANDROID_FLAGS); fi
+ if [ ! -e dist/setup/setup ]; then $(CABAL) configure -f-Production -O0 $(ANDROID_FLAGS) -fAndroidSplice; fi
mkdir -p tmp
if ! $(CABAL) build --ghc-options=-ddump-splices 2> tmp/dump-splices; then tail tmp/dump-splices >&2; exit 1; fi
echo "Setting up Android build tree.."
diff --git a/git-annex.cabal b/git-annex.cabal
index 130fa07c6..68aba982d 100644
--- a/git-annex.cabal
+++ b/git-annex.cabal
@@ -56,7 +56,11 @@ Flag Production
Description: Enable production build (slower build; faster binary)
Flag Android
- Description: Building for Android
+ Description: Cross building for Android
+ Default: False
+
+Flag AndroidSplice
+ Description: Building to get TH splices for Android
Default: False
Flag TestSuite
@@ -155,7 +159,9 @@ Executable git-annex
if flag(Android)
Build-Depends: data-endian
- CPP-Options: -D__ANDROID__
+ CPP-Options: -D__ANDROID__ -DANDROID_SPLICES
+ if flag(AndroidSplices)
+ CPP-Options: -DANDROID_SPLICES
if flag(Webapp) && (! os(windows))
Build-Depends: