packages feed

shake-ext 2.7.0.3 → 2.7.0.4

raw patch · 4 files changed

+15/−14 lines, 4 files

Files

shake-ext.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.18 name: shake-ext-version: 2.7.0.3+version: 2.7.0.4 license: BSD3 license-file: LICENSE copyright: Copyright: (c) 2018 Vanessa McHale@@ -41,11 +41,10 @@         Development.Shake.TH     default-language: Haskell2010     ghc-options: -Wall-    build-tools: cpphs     build-depends:         base >=4.10 && <5,         shake -any,-        composition-prelude,+        composition-prelude -any,         directory -any,         Cabal >=2.0,         template-haskell -any
src/Development/Shake/C.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE CPP             #-} {-# LANGUAGE PatternSynonyms #-}  -- | This module provides functions for easy C builds of binaries, static@@ -21,17 +20,28 @@                            , cconfigToArgs                            , ccToString                            , ccFromString+                           , getCDepends                            , host                            ) where  import           Control.Monad import           Data.List                  (isPrefixOf, isSuffixOf)-#if __GLASGOW_HASKELL__ < 804 import           Data.Semigroup-#endif import           Development.Shake import           Development.Shake.FilePath+import           System.Directory           (removeFile) import           System.Info++-- | Given C source code, return a list of included files. This makes a call to+-- either @clang@ or @gcc@, so it should be used sparingly.+getCDepends :: CCompiler -- ^ Should be either @gcc@ or @clang@.+            -> String -- ^ C source code+            -> Action [FilePath]+getCDepends cc' src = do+    liftIO $ writeFile "shake.c" src+    (Stdout o) <- command [] (ccToString cc') ["-MM", "shake.c"]+    liftIO $ removeFile "shake.c"+    pure (drop 1 . filter (/= "/") $ words o)  mkQualified :: Monoid a => Maybe a -> Maybe a -> a -> a mkQualified pre suff = h [f suff, g pre]
src/Development/Shake/CCJS.hs view
@@ -1,11 +1,7 @@-{-# LANGUAGE CPP #-}- module Development.Shake.CCJS ( ccjs                               ) where -#if __GLASGOW_HASKELL__ < 804 import           Data.Semigroup-#endif import           Development.Shake import           Development.Shake.FilePath import           System.Directory           (createDirectoryIfMissing)
src/Development/Shake/Cabal.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE CPP #-}- module Development.Shake.Cabal ( getCabalDeps                                , getCabalDepsV                                , getCabalDepsA@@ -18,9 +16,7 @@ import           Control.Monad import           Data.Foldable                         (toList) import           Data.Maybe                            (catMaybes)-#if __GLASGOW_HASKELL__ < 804 import           Data.Semigroup-#endif import           Development.Shake                     hiding (doesFileExist) import qualified Development.Shake                     as Shake import           Distribution.ModuleName