Browse Source

Put program behind flag

Getty Ritter 7 years ago
parent
commit
bfd69f5968
1 changed files with 23 additions and 3 deletions
  1. 23 3
      eben.cabal

+ 23 - 3
eben.cabal

@@ -1,31 +1,45 @@
-
 name:                eben
 version:             0.1.0.0
+-- synopsis:
+-- description:
 license:             BSD3
 license-file:        LICENSE
 author:              Getty Ritter
 maintainer:          gdritter@galois.com
+-- copyright:
 category:            Data
 build-type:          Simple
+-- extra-source-files:
 cabal-version:       >=1.10
 
+flag build-programs
+  description: Build helper programs
+  default:     False
+
 library
   exposed-modules:     Data.Eben
   -- other-modules:
   -- other-extensions:
-  build-depends:       base >=4.8 && <4.9, bytestring, containers, cereal
+  build-depends:       base >=4.8 && <4.9,
+                       bytestring,
+                       containers,
+                       cereal
   -- hs-source-dirs:
   default-language:    Haskell2010
 
 executable json2eben
+  if !flag(build-programs)
+    buildable: False
   hs-source-dirs: json2eben
   main-is: Main.hs
   default-extensions: OverloadedStrings, ScopedTypeVariables
-  build-depends: base >=4.8 && <4.9, eben, aeson, scientific, vector, text, bytestring, containers, unordered-containers
+  build-depends: base >=4.8 && <4.9,
+                 eben,
+                 aeson,
+                 scientific,
+                 vector,
+                 text,
+                 bytestring,
+                 containers,
+                 unordered-containers
   default-language: Haskell2010