shakers 0.0.0 → 0.0.2
raw patch · 4 files changed
+49/−25 lines, 4 files
Files
- LICENSE +20/−0
- Shakefile.hs +19/−18
- shakers.cabal +3/−1
- src/Development/Shakers.hs +7/−6
+ LICENSE view
@@ -0,0 +1,20 @@+Copyright (C) 2016 Swift Navigation Inc.++Permission is hereby granted, free of charge, to any person obtaining+a copy of this software and associated documentation files (the+"Software"), to deal in the Software without restriction, including+without limitation the rights to use, copy, modify, merge, publish,+distribute, sublicense, and/or sell copies of the Software, and to+permit persons to whom the Software is furnished to do so, subject to+the following conditions:++The above copyright notice and this permission notice shall be included+in all copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Shakefile.hs view
@@ -14,25 +14,26 @@ -- | Main entry point. -- main :: IO ()-main =- shakeMain $ do- let pats =- [ "stack.yaml"- , "Shakefile.hs"- , "src//*.hs"- ]+main = shakeMain $ do+ let pats =+ [ "stack.yaml"+ , "Shakefile.hs"+ , "src//*.hs"+ ] - -- | Cabal rules.- --- cabalRules "shakers.cabal"+ -- | Cabal rules.+ --+ cabalRules "shakers.cabal" - -- | Stack rules.- --- stackRules pats+ -- | Stack rules.+ --+ stackRules pats - -- | sanity- --- fake' pats "sanity" $ const $- need [ "lint", fakeFile "build-error" ]+ -- | sanity+ --+ fake' pats "sanity" $ const $+ need [ "lint", fakeFile "build-error" ] - want [ "build-error", "lint", "format" ]+ -- | Default things to run.+ --+ want [ "build-error", "lint", "format" ]
shakers.cabal view
@@ -1,8 +1,10 @@ name: shakers-version: 0.0.0+version: 0.0.2 synopsis: Shake helpers.+description: Primitive helpers for Shake files. homepage: https://github.com/swift-nav/shakers license: MIT+license-file: LICENSE author: Swift Navigation Inc. maintainer: Mark Fine <dev@swiftnav.com> copyright: Copyright (C) 2016 Swift Navigation, Inc.
src/Development/Shakers.hs view
@@ -143,10 +143,11 @@ preprocess :: FilePath -> Action [(String, String)] -> Rules () preprocess file macros = file %> \out -> do- need [ file <.> "m4" ]+ let template = file <.> "m4"+ need [ template ] let f k v = "-D" <> k <> "=" <> v macros' <- macros- content <- m4 $ file : (uncurry f <$> macros')+ content <- m4 $ template : (uncurry f <$> macros') writeFileChanged out content -- | Haskell source rules@@ -173,8 +174,8 @@ -- | clear -- phony "clear" $- forM_ [ fakeDir, metaDir ] $ \dir ->- removeFilesAfter dir [ "//*" ]+ forM_ [ fakeDir, metaDir ] $+ flip removeFilesAfter [ "//*" ] -- | clean --@@ -185,8 +186,8 @@ -- | clobber -- phony "clobber" $- forM_ [ buildDir, stackDir ] $ \dir ->- removeFilesAfter dir [ "//*" ]+ forM_ [ buildDir, stackDir ] $+ flip removeFilesAfter [ "//*" ] -- | Stack rules. --