summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Biz/Bild.hs11
1 files changed, 8 insertions, 3 deletions
diff --git a/Biz/Bild.hs b/Biz/Bild.hs
index 270508f..602a326 100644
--- a/Biz/Bild.hs
+++ b/Biz/Bild.hs
@@ -349,8 +349,13 @@ analyze path = do
Namespace.C -> do
pure
Target
- { langdeps = Set.empty,
- sysdeps = Set.empty,
+ { langdeps = Set.empty, -- c has no lang deps...?
+ sysdeps =
+ contentLines
+ /> Text.unpack
+ /> Regex.match (metaSys "//")
+ |> catMaybes
+ |> Set.fromList,
compiler = Gcc,
out =
contentLines
@@ -664,7 +669,7 @@ metaDep :: Regex.RE Char Dep
metaDep = Regex.string "-- : dep " *> Regex.many (Regex.psym Char.isAlpha)
metaSys :: [Char] -> Regex.RE Char Dep
-metaSys comment = Regex.string (comment ++ " : sys ") *> Regex.many (Regex.psym Char.isAlpha)
+metaSys comment = Regex.string (comment ++ " : sys ") *> Regex.many (Regex.psym (not <. Char.isSpace))
metaOut :: [Char] -> Regex.RE Char Out
metaOut comment = Regex.string (comment ++ " : out ") *> Regex.many (Regex.psym (/= ' '))