From 49b4cf05fba4aff0ca8de92f274bfc5c4752f5e2 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 4 Aug 2022 09:48:48 -0400 Subject: Add wutbar glyph and use it --- Biz/Bild.hs | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'Biz/Bild.hs') diff --git a/Biz/Bild.hs b/Biz/Bild.hs index ed59598..ea5875f 100644 --- a/Biz/Bild.hs +++ b/Biz/Bild.hs @@ -383,30 +383,30 @@ analyze hmap ns = case Map.lookup ns hmap of /> Regex.match (metaSys "//") |> catMaybes |> Set.fromList - guileFlags <- - if "guile_3_0" `elem` sysdeps - then - Process.readProcess "guile-config" ["compile"] "" - /> String.words - /> (++ ["-shared", "-fPIC"]) - /> map Text.pack - else pure mempty - Just - outToPath out], []) - ], - outPath = outToPath out, - .. - } + ("guile_3_0" `elem` sysdeps) + ?. ( pure mempty, + Process.readProcess "guile-config" ["compile"] "" + /> String.words + /> (++ ["-shared", "-fPIC"]) + /> map Text.pack + ) + +> \guileFlags -> + Target + { langdeps = Set.empty, -- c has no lang deps...? + compiler = Gcc, + builder = Local <| user, + compilerFlags = + concat + [ [o, dir, Text.pack absPath] ++ guileFlags + | let outable = out /= None, + o <- outable ?: (["-o"], []), + dir <- outable ?: ([Text.pack <| root outToPath out], []) + ], + outPath = outToPath out, + .. + } + |> Just + |> pure Namespace.Hs -> do langdeps <- detectHaskellImports contentLines let out = @@ -654,7 +654,7 @@ build andTest loud analysis = do Guile -> do Log.info ["bild", "dev", "guile", nschunk namespace] _ <- proc loud namespace "guild" compilerFlags - when (out /= None) <| do + (out /= None) ?| do writeFile (root outToPath out) <| Text.pack -- cgit v1.2.3