Update .cabal file so that a default build is expected to be in the GHC tree
authorChristiaan Baaij <christiaan.baaij@gmail.com>
Wed, 22 Jul 2009 07:37:59 +0000 (09:37 +0200)
committerChristiaan Baaij <christiaan.baaij@gmail.com>
Wed, 22 Jul 2009 07:37:59 +0000 (09:37 +0200)
cλash/clash.cabal

index 7ea2ed089514a825e4d9afa2d2cd11311f2e21be..6daa84322ca00577a06955fc6c1d5ebc3e962614 100644 (file)
@@ -16,11 +16,22 @@ stability:          alpha
 maintainer:         christiaan.baaij@gmail.com & matthijs@stdin.nl
 Cabal-Version:      >= 1.2
 
+flag out-ghc-tree
+  description: Are we outside a GHC tree?
+  default: False
+  manual: True
+
 Library
-  build-depends:    ghc >= 6.11, pretty, vhdl, haskell98, ghc-paths, syb,
-                    data-accessor, containers, base >= 4, transformers,
-                    filepath, template-haskell, data-accessor-template,
-                    prettyclass
+  if flag(out-ghc-tree)
+    build-depends:  ghc-paths
+  else
+    cpp-options:    -DIN_GHC_TREE
+
+  build-depends:    ghc >= 6.11, pretty, vhdl, haskell98, syb, data-accessor, 
+                    containers, base >= 4, transformers, filepath, 
+                    template-haskell, data-accessor-template, prettyclass
+                    
+  extensions:       CPP
                     
   exposed-modules:  CLasH.Translator,
                     CLasH.Translator.Annotations