Make UnixFilter module optional

This commit is contained in:
Jasper Van der Jeugt 2012-05-17 11:46:23 +02:00
parent 759f1e61ea
commit 84b5b16108
2 changed files with 21 additions and 6 deletions

View file

@ -52,7 +52,11 @@ Source-Repository head
Flag previewServer
Description: Include the preview server
default: True
Default: True
Flag unixFilter
Description: Include the UnixFilter module
Default: True
Library
Ghc-Options: -Wall
@ -78,8 +82,7 @@ Library
regex-base >= 0.93 && < 0.94,
regex-tdfa >= 1.1 && < 1.2,
tagsoup >= 0.12.6 && < 0.13,
time >= 1.1 && < 1.5,
unix >= 2.4 && < 2.6
time >= 1.1 && < 1.5
Exposed-Modules:
Hakyll
@ -99,7 +102,6 @@ Library
Hakyll.Core.Rules
Hakyll.Core.Run
Hakyll.Core.Store
Hakyll.Core.UnixFilter
Hakyll.Core.Util.Arrow
Hakyll.Core.Util.File
Hakyll.Core.Util.String
@ -138,12 +140,20 @@ Library
Build-depends:
snap-core >= 0.6 && < 0.9,
snap-server >= 0.6 && < 0.9
Cpp-Options:
Cpp-options:
-DPREVIEW_SERVER
Other-Modules:
Other-modules:
Hakyll.Web.Preview.Poll
Hakyll.Web.Preview.Server
If flag(unixFilter)
Build-depends:
unix >= 2.4 && < 2.6
Cpp-options:
-DUNIX_FILTER
Other-modules:
Hakyll.Core.UnixFilter
Test-suite hakyll-tests
Type: exitcode-stdio-1.0
Hs-source-dirs: src tests

View file

@ -1,5 +1,6 @@
-- | Top-level module exporting all modules that are interesting for the user
--
{-# LANGUAGE CPP #-}
module Hakyll
( module Hakyll.Core.Compiler
, module Hakyll.Core.Configuration
@ -9,7 +10,9 @@ module Hakyll
, module Hakyll.Core.Resource.Provider
, module Hakyll.Core.Routes
, module Hakyll.Core.Rules
#ifdef UNIX_FILTER
, module Hakyll.Core.UnixFilter
#endif
, module Hakyll.Core.Util.Arrow
, module Hakyll.Core.Util.File
, module Hakyll.Core.Util.String
@ -43,7 +46,9 @@ import Hakyll.Core.Resource
import Hakyll.Core.Resource.Provider
import Hakyll.Core.Routes
import Hakyll.Core.Rules
#ifdef UNIX_FILTER
import Hakyll.Core.UnixFilter
#endif
import Hakyll.Core.Util.Arrow
import Hakyll.Core.Util.File
import Hakyll.Core.Util.String