cmmBuilds :: String -> String -> String -> [String] -> [String]
cmmBuilds ghc ghc_build lib_dir ss = (map go ss) ++ [cat] where
    go f = ghc ++ " -I" ++ ghc_build ++ "/rts -c -O2 "
                ++ ghc_build ++ "/rts/" ++ f ++ ".cmm -o " ++ o f
    cat = "cat " ++ (intercalate " " $ map o ss) ++ " > " ++ lib_dir ++ "/rts/libHSrts.a"
    o f = lib_dir ++ "/rts/" ++ (takeFileName f) ++ ".o"
cmmBuilds :: String -> String -> String -> [String] -> [String]
cmmBuilds ghc ghc_build lib_dir ss = (map go ss) ++ [cat] where
    go f = ghc ++ " -I" ++ ghc_build ++ "/rts -c -O2 "
                ++ ghc_build ++ "/rts/" ++ f ++ ".cmm -o " ++ o f
    cat = "cat " ++ (intercalate " " $ map o ss) ++ " > " ++ lib_dir ++ "/rts/libHSrts.a"
    o f = lib_dir ++ "/rts/" ++ (takeFileName f) ++ ".o"
cmmBuilds ghc ghc_build lib_dir ss = (map go ss) ++ [cat] where
    go f = ghc ++ " -I" ++ ghc_build ++ "/rts -c -O2 "
                ++ ghc_build ++ "/rts/" ++ f ++ ".cmm -o " ++ o f
    cat = "cat " ++ (intercalate " " $ map o ss) ++ " > " ++ lib_dir ++ "/rts/libHSrts.a"
    o f = lib_dir ++ "/rts/" ++ (takeFileName f) ++ ".o"