Permalink
Browse files

Change NoJava flag to Java, and make no java back end the default

  • Loading branch information...
1 parent a93ea55 commit c9d32af38bac4ef1286260c3ad448a6ae5112d2e @edwinb committed Mar 17, 2013
Showing with 18 additions and 18 deletions.
  1. +13 −13 Setup.hs
  2. +3 −3 config.mk
  3. +2 −2 idris.cabal
View
@@ -18,7 +18,6 @@ import System.Process
import qualified Data.Text as T
import qualified Data.Text.IO as TIO
-
-- After Idris is built, we need to check and install the prelude and other libs
make verbosity = P.runProgramInvocation verbosity . P.simpleProgramInvocation "make"
@@ -70,6 +69,7 @@ installStdLib pkg local verbosity copy
installJavaLib pkg local verbosity copy version = do
let rtsFile = "idris-" ++ display version ++ ".jar"
+ putStrLn $ "Installing java libraries"
mvn verbosity [ "install:install-file"
, "-Dfile=" ++ ("java" </> "target" </> rtsFile)
, "-DgroupId=org.idris-lang"
@@ -111,8 +111,8 @@ checkStdLib local verbosity
checkJavaLib verbosity = mvn verbosity [ "-f", "java" </> "pom.xml", "package" ]
-noJavaFlag flags =
- case lookup (FlagName "nojava") (S.configConfigurationsFlags flags) of
+javaFlag flags =
+ case lookup (FlagName "java") (S.configConfigurationsFlags flags) of
Just True -> True
Just False -> False
Nothing -> False
@@ -138,23 +138,23 @@ main = do
let verb = (S.fromFlag $ S.installVerbosity flags)
installStdLib pkg lbi verb
NoCopyDest
- unless (noJavaFlag $ configFlags lbi)
- (installJavaLib pkg
- lbi
- verb
- NoCopyDest
- (pkgVersion . package $ localPkgDescr lbi)
- )
+ when (javaFlag $ configFlags lbi)
+ (installJavaLib pkg
+ lbi
+ verb
+ NoCopyDest
+ (pkgVersion . package $ localPkgDescr lbi)
+ )
, postConf = \ _ flags _ lbi -> do
removeLibIdris lbi (S.fromFlag $ S.configVerbosity flags)
- unless (noJavaFlag $ configFlags lbi)
- (preparePoms . pkgVersion . package $ localPkgDescr lbi)
+ when (javaFlag $ configFlags lbi)
+ (preparePoms . pkgVersion . package $ localPkgDescr lbi)
, postClean = \ _ flags _ _ -> do
let verb = S.fromFlag $ S.cleanVerbosity flags
cleanStdLib verb
cleanJavaLib verb
, postBuild = \ _ flags _ lbi -> do
let verb = S.fromFlag $ S.buildVerbosity flags
checkStdLib lbi verb
- unless (noJavaFlag $ configFlags lbi) (checkJavaLib verb)
+ when (javaFlag $ configFlags lbi) (checkJavaLib verb)
}
View
@@ -1,6 +1,6 @@
GMP_INCLUDE_DIR :=
CC :=gcc
CABAL :=cabal
-CABALFLAGS :=
-## Disable Java RTS:
-#CABALFLAGS :=-f NoJava
+CABALFLAGS :=-f Java
+## Enable Java RTS:
+#CABALFLAGS :=-f Java
View
@@ -71,8 +71,8 @@ source-repository head
type: git
location: git://github.com/edwinb/Idris-dev.git
-Flag NoJava
- Description: Do not build the Java RTS
+Flag Java
+ Description: Build the Java RTS
Default: False

0 comments on commit c9d32af

Please sign in to comment.