Permalink
Browse files

rejigging cabal to use hubris lib

  • Loading branch information...
1 parent 679bf69 commit 2384c71bce7fdb9616216cf0b461176741cff352 @mwotton committed Jan 11, 2013
Showing with 17 additions and 9 deletions.
  1. +2 −3 Haskell/{ → binary}/Hubrify.hs
  2. +15 −6 Haskell/hubris.cabal
@@ -54,10 +54,9 @@ hubrisOpts argv =
main :: IO ()
main = do
+
(o, srcs) <- getArgs >>= hubrisOpts
let ghcArgs = guard (optStrict o) >> ["-Wall", "-Werror", "-fno-warn-unused-imports"]
-
res <- generateLib (optOutput o) srcs (optModule o) ("-fPIC":ghcArgs) (optPackages o)
-
- either (putStrLn . ("Failed: " ++) >> const exitFailure) (const exitSuccess) res
+ either (\x -> putStrLn ("Failed: " ++ x) >> exitFailure) (const exitSuccess) res
View
@@ -3,7 +3,7 @@ Version: 0.0.4
Author: Mark Wotton
Maintainer: mwotton@gmail.com
Build-Type: Simple
-Cabal-Version: >=1.2
+Cabal-Version: >=1.8
License: OtherLicense
License-File: LICENSE
Build-Type: Simple
@@ -21,7 +21,14 @@ Description: Support library for Hubris, the Ruby to Haskell bridge
Library
-- the ordering is critical, because Cabal doesn't do dependency analysis.
- Exposed-Modules: Language.Ruby.Hubris.Binding, Language.Ruby.Hubris, Language.Ruby.Hubris.LibraryBuilder, Language.Ruby.Hubris.ZCode, Language.Ruby.Hubris.GHCBuild,Language.Ruby.Hubris.Includes
+ Exposed-Modules: Language.Ruby.Hubris.LibraryBuilder,
+ Language.Ruby.Hubris.Binding,
+ Language.Ruby.Hubris
+ Other-Modules: Language.Ruby.Hubris.FileUtil,
+ Language.Ruby.Hubris.ZCode,
+ Language.Ruby.Hubris.GHCBuild,
+ Language.Ruby.Hubris.Includes
+
-- , Language.Ruby.Hubris.Includes
c-sources: cbits/rshim.c
-- includes: cbits/rshim.h
@@ -34,14 +41,16 @@ Library
--extra-include-dirs=/opt/local/include/ruby-1.9.1/
--extra-lib-dirs: /opt/local/lib
extra-libraries: ruby
- build-depends: ghc, Cabal>=1.7.4 && < 2.0, base, containers, bytestring, array, mtl, old-time, ghc-paths, hint >= 0.3.3.2, HUnit
+ build-depends: ghc, Cabal>=1.7.4 && < 2.0, base, containers, bytestring, array, mtl, old-time, ghc-paths, hint >= 0.3.3.2, HUnit, process
Executable Hubrify
Main-is: Hubrify.hs
- Build-Depends: base >= 3 && < 5, Cabal>=1.7.4 && < 2.0, base, containers, bytestring, array, mtl, old-time, ghc-paths, hint, process,ghc
- Other-Modules: Language.Ruby.Hubris.Binding
+ Build-Depends: base >= 3 && < 5, Cabal>=1.7.4 && < 2.0, hubris
+-- array, mtl, old-time, ghc-paths, hint, process,ghc
+-- Other-Modules: Language.Ruby.Hubris.Binding
c-sources: cbits/rshim.c
- include-dirs: cbits
+ hs-source-dirs: binary
+-- include-dirs: cbits
cc-options: -U__BLOCKS__ -DHAVE_SNPRINTF
extra-libraries: ruby
-- extra-libraries: ruby1.9

0 comments on commit 2384c71

Please sign in to comment.