on master help sign in
Merge pull request #343 from chetant/mvn_mingw32

Fixed Java backend building & installation on Windows/mingw32

commit1b589f84f7db4bda85e8054878bcba20958d34f4 authorEdwin Brady <edwin.brady@gmail.com> dateSun 23 Jun 2013, 14:43 (13 years ago) parentf885274fc5bd4a
2 files changed+11−2
Setup.hs+6−1 src/Util/System.hs+5−1
Setup.hs+6−1
@@ -21,7 +21,12 @@ import qualified Data.Text.IO as TIO
2121-- After Idris is built, we need to check and install the prelude and other libs
2222
2323make verbosity = P.runProgramInvocation verbosity . P.simpleProgramInvocation "make"
24−mvn verbosity = P.runProgramInvocation verbosity . P.simpleProgramInvocation "mvn"
24+mvn verbosity = P.runProgramInvocation verbosity . P.simpleProgramInvocation
25+#ifdef mingw32_HOST_OS
26+ "mvn.bat"
27+#else
28+ "mvn"
29+#endif
2530
2631#ifdef mingw32_HOST_OS
2732-- make on mingw32 exepects unix style separators
src/Util/System.hs+5−1
@@ -43,7 +43,11 @@ getCC = do env <- environment "IDRIS_CC"
4343getMvn :: IO String
4444getMvn = do env <- environment "IDRIS_MVN"
4545 case env of
46+#ifdef mingw32_HOST_OS
47+ Nothing -> return "mvn.bat"
48+#else
4649 Nothing -> return "mvn"
50+#endif
4751 Just mvn -> return mvn
4852
4953tempfile :: IO (FilePath, Handle)
@@ -84,4 +88,4 @@ getIncFlags = do dir <- getDataDir
8488 return $ "-I" ++ dir </> "rts"
8589
8690getExecutablePom = do dir <- getDataDir
87− return $ dir </> "executable_pom.xml"
91+ return $ dir </> "executable_pom.xml"