File: Shake.hs

package info (click to toggle)
haskell-shake 0.13.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 888 kB
  • ctags: 127
  • sloc: haskell: 6,388; makefile: 35; ansic: 25; sh: 2
file content (29 lines) | stat: -rw-r--r-- 954 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

-- | The main entry point that calls all the default rules
module Development.Shake.Shake(shake) where

import Development.Shake.Types
import General.Timing
import Development.Shake.Core

import Development.Shake.Rules.Directory
import Development.Shake.Rules.File
import Development.Shake.Rules.OrderOnly
import Development.Shake.Rules.Rerun


-- | Main entry point for running Shake build systems. For an example see the top of the module "Development.Shake".
--   Use 'ShakeOptions' to specify how the system runs, and 'Rules' to specify what to build. The function will throw
--   an exception if the build fails.
--
--   To use command line flags to modify 'ShakeOptions' see 'Development.Shake.shakeArgs'.
shake :: ShakeOptions -> Rules () -> IO ()
shake opts r = do
    addTiming "Function shake"
    run opts $ do
        r
        defaultRuleFile
        defaultRuleDirectory
        defaultRuleOrderOnly
        defaultRuleRerun
    return ()