diff --git a/Assistant/WebApp/Configurators/Upgrade.hs b/Assistant/WebApp/Configurators/Upgrade.hs index b6bdaac045..77d9c062d8 100644 --- a/Assistant/WebApp/Configurators/Upgrade.hs +++ b/Assistant/WebApp/Configurators/Upgrade.hs @@ -23,7 +23,7 @@ import Config - -} getConfigStartUpgradeR :: GitAnnexDistribution -> Handler Html getConfigStartUpgradeR d = do -#ifdef __ANDROID__ +#ifdef ANDROID_SPLICES let url = distributionUrl d page "Upgrade" (Just Configuration) $ $(widgetFile "configurators/upgrade/android") diff --git a/Makefile b/Makefile index ed3c93325c..9c2d2d3805 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 130fa07c61..68aba982d3 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: