]> average.org Git - pdns-pipe-nmc.git/commitdiff
next take on version-dependent build
authorEugene Crosser <crosser@average.org>
Fri, 2 May 2014 16:42:04 +0000 (20:42 +0400)
committerEugene Crosser <crosser@average.org>
Fri, 2 May 2014 16:42:04 +0000 (20:42 +0400)
.ghci [new file with mode: 0644]
build
pdns-pipe-nmc.hs

diff --git a/.ghci b/.ghci
new file mode 100644 (file)
index 0000000..d4289dd
--- /dev/null
+++ b/.ghci
@@ -0,0 +1 @@
+:set -optP-include -optPdist/build/autogen/cabal_macros.h
diff --git a/build b/build
index fe589f915b9c51bc164c4c987583b40ecabf4cac..c1f039fd8aa96c19369207e049b1d4e071d0be7f 100755 (executable)
--- a/build
+++ b/build
@@ -9,6 +9,12 @@ echo "Making $file.$sfx"
 #           -optl-pthread -pgml g++ "$file"
 # but cannot make it "only glibc is shared". And with static glibc,
 # getaddrinfo does not work on systems with different glibc.
+#
+# To build with ghc, run this:
+#ghc --make -optP-include -optPdist/build/autogen/cabal_macros.h "$file"
+# but it is still necessary to run `cabal configure` before to generate
+# the file `dist/build/autogen/cabal_macros.h`.
+
 cabal build
 case $? in
 0) ;;
index dbb7853770d3027d46a2e83a83b19ab44fd1627f..bbe89ab1ccea7025bcf06b7a5ab3cfb426dd2673 100644 (file)
@@ -22,7 +22,7 @@ import Data.Map.Lazy (Map, empty, lookup, insert, delete, size)
 import Data.Aeson (encode, decode, Value(..))
 import Network.HTTP.Types
 import Network.HTTP.Client
-#if MIN_VERSION_data_default(0,5,3)
+#if MIN_VERSION_http_client(0,3,0)
 import Data.Default.Class (def)
 #else
 import Data.Default (def)