Commit ecdeae76 authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Clean up.

parent ba41dedc
...@@ -14,7 +14,7 @@ windowsRoot = askOracle $ WindowsRoot () ...@@ -14,7 +14,7 @@ windowsRoot = askOracle $ WindowsRoot ()
-- the root is slow (at least the current implementation). -- the root is slow (at least the current implementation).
windowsRootOracle :: Rules () windowsRootOracle :: Rules ()
windowsRootOracle = do windowsRootOracle = do
root <- newCache $ \() -> do root <- newCache $ \_ -> do
Stdout out <- quietly $ cmd ["cygpath", "-m", "/"] Stdout out <- quietly $ cmd ["cygpath", "-m", "/"]
let root = dropWhileEnd isSpace out let root = dropWhileEnd isSpace out
putOracle $ "Detected root on Windows: " ++ root putOracle $ "Detected root on Windows: " ++ root
......
...@@ -44,19 +44,19 @@ buildPackageData rs target @ (PartialTarget stage pkg) = do ...@@ -44,19 +44,19 @@ buildPackageData rs target @ (PartialTarget stage pkg) = do
-- TODO: code duplication around ghcIncludeDirs -- TODO: code duplication around ghcIncludeDirs
priority 2.0 $ do priority 2.0 $ do
when (pkg == hp2ps) $ dataFile %> \mk -> do when (pkg == hp2ps) $ dataFile %> \mk -> do
let cSrcs = [ "AreaBelow.c", "Curves.c", "Error.c", "Main.c" let prefix = "utils_hp2ps_stage" ++ show (fromEnum stage) ++ "_"
, "Reorder.c", "TopTwenty.c", "AuxFile.c", "Deviation.c" cSrcs = [ "AreaBelow.c", "Curves.c", "Error.c", "Main.c"
, "HpFile.c", "Marks.c", "Scale.c", "TraceElement.c" , "Reorder.c", "TopTwenty.c", "AuxFile.c"
, "Axes.c", "Dimensions.c", "Key.c", "PsFile.c" , "Deviation.c", "HpFile.c", "Marks.c", "Scale.c"
, "Shade.c", "Utilities.c" ] , "TraceElement.c", "Axes.c", "Dimensions.c", "Key.c"
contents = unlines , "PsFile.c", "Shade.c", "Utilities.c" ]
[ "utils_hp2ps_stage0_PROGNAME = hp2ps" contents = unlines $ map (prefix++)
, "utils_hp2ps_stage0_C_SRCS = " ++ unwords cSrcs [ "PROGNAME = hp2ps"
, "utils_hp2ps_stage0_INSTALL = YES" , "C_SRCS = " ++ unwords cSrcs
, "utils_hp2ps_stage0_INSTALL_INPLACE = YES" , "INSTALL = YES"
, "utils_hp2ps_stage0_DEP_EXTRA_LIBS = m" , "INSTALL_INPLACE = YES"
, "utils_hp2ps_stage0_CC_OPTS = " , "DEP_EXTRA_LIBS = m"
++ unwords (map ("-I"++) ghcIncludeDirs) ] , "CC_OPTS = " ++ unwords (map ("-I"++) ghcIncludeDirs) ]
writeFileChanged mk contents writeFileChanged mk contents
putBuild $ "| Successfully generated '" ++ mk ++ "'." putBuild $ "| Successfully generated '" ++ mk ++ "'."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment