[commit: ghc] wip/nfs-locking: Clean up. (ecdeae7)

git at git.haskell.org git at git.haskell.org
Thu Oct 26 23:44:56 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/ecdeae76f0a89eec2f95a5285f174ef6ef107329/ghc

>---------------------------------------------------------------

commit ecdeae76f0a89eec2f95a5285f174ef6ef107329
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Wed Dec 23 06:13:11 2015 +0000

    Clean up.


>---------------------------------------------------------------

ecdeae76f0a89eec2f95a5285f174ef6ef107329
 src/Oracles/WindowsRoot.hs |  2 +-
 src/Rules/Data.hs          | 26 +++++++++++++-------------
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/Oracles/WindowsRoot.hs b/src/Oracles/WindowsRoot.hs
index 51cb516..2ec13c7 100644
--- a/src/Oracles/WindowsRoot.hs
+++ b/src/Oracles/WindowsRoot.hs
@@ -14,7 +14,7 @@ windowsRoot = askOracle $ WindowsRoot ()
 -- the root is slow (at least the current implementation).
 windowsRootOracle :: Rules ()
 windowsRootOracle = do
-    root <- newCache $ \() -> do
+    root <- newCache $ \_ -> do
         Stdout out <- quietly $ cmd ["cygpath", "-m", "/"]
         let root = dropWhileEnd isSpace out
         putOracle $ "Detected root on Windows: " ++ root
diff --git a/src/Rules/Data.hs b/src/Rules/Data.hs
index 96deed9..26755ca 100644
--- a/src/Rules/Data.hs
+++ b/src/Rules/Data.hs
@@ -44,19 +44,19 @@ buildPackageData rs target @ (PartialTarget stage pkg) = do
     -- TODO: code duplication around ghcIncludeDirs
     priority 2.0 $ do
         when (pkg == hp2ps) $ dataFile %> \mk -> do
-            let cSrcs = [ "AreaBelow.c", "Curves.c", "Error.c", "Main.c"
-                        , "Reorder.c", "TopTwenty.c", "AuxFile.c", "Deviation.c"
-                        , "HpFile.c", "Marks.c", "Scale.c", "TraceElement.c"
-                        , "Axes.c", "Dimensions.c", "Key.c", "PsFile.c"
-                        , "Shade.c", "Utilities.c" ]
-                contents = unlines
-                    [ "utils_hp2ps_stage0_PROGNAME = hp2ps"
-                    , "utils_hp2ps_stage0_C_SRCS = " ++ unwords cSrcs
-                    , "utils_hp2ps_stage0_INSTALL = YES"
-                    , "utils_hp2ps_stage0_INSTALL_INPLACE = YES"
-                    , "utils_hp2ps_stage0_DEP_EXTRA_LIBS = m"
-                    , "utils_hp2ps_stage0_CC_OPTS = "
-                      ++ unwords (map ("-I"++) ghcIncludeDirs) ]
+            let prefix = "utils_hp2ps_stage" ++ show (fromEnum stage) ++ "_"
+                cSrcs  = [ "AreaBelow.c", "Curves.c", "Error.c", "Main.c"
+                         , "Reorder.c", "TopTwenty.c", "AuxFile.c"
+                         , "Deviation.c", "HpFile.c", "Marks.c", "Scale.c"
+                         , "TraceElement.c", "Axes.c", "Dimensions.c", "Key.c"
+                         , "PsFile.c", "Shade.c", "Utilities.c" ]
+                contents = unlines $ map (prefix++)
+                    [ "PROGNAME = hp2ps"
+                    , "C_SRCS = " ++ unwords cSrcs
+                    , "INSTALL = YES"
+                    , "INSTALL_INPLACE = YES"
+                    , "DEP_EXTRA_LIBS = m"
+                    , "CC_OPTS = " ++ unwords (map ("-I"++) ghcIncludeDirs) ]
             writeFileChanged mk contents
             putBuild $ "| Successfully generated '" ++ mk ++ "'."
 



More information about the ghc-commits mailing list