summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/Xmobar/App/Compile.hs17
-rw-r--r--xmobar.cabal3
2 files changed, 16 insertions, 4 deletions
diff --git a/src/Xmobar/App/Compile.hs b/src/Xmobar/App/Compile.hs
index 3332c45..6c136dc 100644
--- a/src/Xmobar/App/Compile.hs
+++ b/src/Xmobar/App/Compile.hs
@@ -1,3 +1,5 @@
+{-# LANGUAGE CPP #-}
+
------------------------------------------------------------------------------
-- |
-- Module: Xmobar.App.Compile
@@ -71,9 +73,9 @@ shouldRecompile verb src bin lib = do
trace verb "Xmobar doing recompile because some files have changed."
return True
else do
- trace verb "Xmobar skipping recompile because it is not forced \
- \ (e.g. via --recompile), and not any *.hs / *.lhs / *.hsc \
- \ files in lib/ have been changed."
+ trace verb $ "Xmobar skipping recompile because it is not forced "
+ ++ "(e.g. via --recompile), and not any *.hs / *.lhs / *.hsc"
+ ++ "files in lib/ have been changed."
return False
where isSource = flip elem [".hs",".lhs",".hsc"] . takeExtension
allFiles t = do
@@ -159,7 +161,14 @@ recompile dir execName force verb = liftIO $ do
return (status == ExitSuccess)
else return True
where opts bin = ["--make" , execName ++ ".hs" , "-i" , "-ilib"
- , "-fforce-recomp" , "-main-is", "main" , "-v0" , "-o", bin]
+ , "-fforce-recomp" , "-main-is", "main" , "-v0"]
+#ifdef THREADED_RUNTIME
+ ++ ["-threaded"]
+#endif
+#ifdef DRTSOPTS
+ ++ ["-rtsopts", "-with-rtsopts", "-V0"]
+#endif
+ ++ ["-o", bin]
runGHC bin = runProc "ghc" (opts bin)
runScript script bin = runProc script [bin]
diff --git a/xmobar.cabal b/xmobar.cabal
index e96c4a2..d7ea53a 100644
--- a/xmobar.cabal
+++ b/xmobar.cabal
@@ -190,6 +190,9 @@ library
ghc-options: -threaded
cpp-options: -DTHREADED_RUNTIME
+ if flag(with_rtsopts)
+ cpp-options: -DRTSOPTS
+
if flag(with_xft) || flag(all_extensions)
build-depends: utf8-string >= 0.3 && < 1.1, X11-xft >= 0.2 && < 0.4
other-modules: Xmobar.X11.MinXft