diff --git a/Development/Hake.hs b/Development/Hake.hs
--- a/Development/Hake.hs
+++ b/Development/Hake.hs
@@ -47,7 +47,7 @@
 import System.Environment           (getArgs)
 import System.Exit                  (ExitCode(ExitSuccess, ExitFailure))
 import System.Directory             (doesFileExist)
-import System.Directory.Tools       (maybeGetModificationTime)
+import Development.Hake.DirectoryTools (maybeGetModificationTime)
 import System.IO.Unsafe             (unsafeInterleaveIO)
 import Control.Monad.Trans          (lift)
 import Control.Monad.Reader         (ReaderT(runReaderT), asks)
diff --git a/Development/Hake/Core.hs b/Development/Hake/Core.hs
--- a/Development/Hake/Core.hs
+++ b/Development/Hake/Core.hs
@@ -6,7 +6,7 @@
 ) where
 
 import System.Directory          (doesFileExist)
-import System.Directory.Tools    (maybeGetModificationTime)
+import Development.Hake.DirectoryTools (maybeGetModificationTime)
 import Control.Monad.Trans       (lift)
 import Control.Monad.Tools       (ifM)
 import Control.Applicative       ((<$>), liftA2)
diff --git a/Development/Hake/DirectoryTools.hs b/Development/Hake/DirectoryTools.hs
new file mode 100644
--- /dev/null
+++ b/Development/Hake/DirectoryTools.hs
@@ -0,0 +1,20 @@
+module Development.Hake.DirectoryTools (
+  maybeGetModificationTime
+, doesNotExistOrOldThan
+) where
+
+import System.Directory    (doesFileExist, getModificationTime)
+import System.Time         (ClockTime)
+import Control.Monad.Tools (ifM)
+import Control.Applicative (liftA2, (<$>))
+import Data.Function       (on)
+
+maybeGetModificationTime :: FilePath -> IO (Maybe ClockTime)
+maybeGetModificationTime fn
+  = ifM (doesFileExist fn)
+        (Just <$> getModificationTime fn)
+	(return Nothing)
+
+doesNotExistOrOldThan :: FilePath -> FilePath -> IO Bool
+doesNotExistOrOldThan dfn sfn
+  = on (liftA2 (<)) maybeGetModificationTime dfn sfn
diff --git a/Development/Hake/RunHake.hs b/Development/Hake/RunHake.hs
--- a/Development/Hake/RunHake.hs
+++ b/Development/Hake/RunHake.hs
@@ -24,13 +24,13 @@
 import System.Exit                (ExitCode(ExitSuccess), exitWith)
 import System.Directory           (createDirectory, doesDirectoryExist,
                                    doesFileExist)
-import System.Directory.Tools     (doesNotExistOrOldThan)
+import Development.Hake.DirectoryTools     (doesNotExistOrOldThan)
 import System.FilePath            (takeFileName)
 import System.Process             (runProcess, waitForProcess)
 import Control.Monad              (when)
 import Control.Monad.Tools        (unlessM, filterM)
 import Data.Function.Tools        (applyWhen, apply2way)
-import YJTools.Tribial            (ghcMake, updateFile_)
+import Development.Hake.Tribial   (ghcMake, updateFile_)
 import Text.RegexPR               (gsubRegexPR, ggetbrsRegexPR, matchRegexPR)
 import Development.Hake.Variables (defaultTrgtStr, hakefileUpdateOption,
                                    hakeDir, commentPair, srcSuffix, exeEscPairs)
diff --git a/Development/Hake/Tribial.hs b/Development/Hake/Tribial.hs
new file mode 100644
--- /dev/null
+++ b/Development/Hake/Tribial.hs
@@ -0,0 +1,39 @@
+module Development.Hake.Tribial (
+  ghcMake
+, updateFile_
+) where
+
+import System.IO              (openFile, hClose, IOMode(WriteMode), hGetLine,
+                               IOMode(ReadMode), withFile)
+import System.IO.Unsafe       (unsafeInterleaveIO)
+import System.Process         (runProcess, waitForProcess)
+import System.Exit            (ExitCode(ExitSuccess))
+import System.Directory       (doesFileExist)
+import Development.Hake.DirectoryTools (doesNotExistOrOldThan)
+import Control.Exception      (bracket)
+import Control.Monad.Tools    (ifM)
+import Control.Applicative    ((<$>))
+
+ghcMake :: String -> FilePath -> IO ExitCode
+ghcMake exe dir = do
+  let errFile = dir ++ "/" ++ exe ++ ".error"
+  ret <- bracket (openFile errFile WriteMode) hClose $ \errH ->
+           runProcess "ghc" [ "--make", exe ] (Just dir)
+                      Nothing Nothing Nothing (Just errH) >>= waitForProcess
+  case ret of
+       ExitSuccess -> return ()
+       _           -> readFile errFile >>= putStr
+  return ret
+
+updateFile_ :: (String -> Maybe String) -> (FilePath -> String) -> FilePath -> FilePath -> IO Bool
+updateFile_ gtSrc hdr src dst
+  = ifM ( not <$> doesFileExist dst
+          `orIO`
+          (/= Just src) . gtSrc <$> withFile dst ReadMode (hGetLine)
+          `orIO`
+          doesNotExistOrOldThan dst src )
+      (readFile src >>= writeFile dst . ( (hdr src ++ "\n") ++ ) >> return True )
+      (                                                             return False)
+  where
+  infixr 2 `orIO`
+  orIO p1 p2     = do { b1 <- p1; b2 <- unsafeInterleaveIO p2; return $ b1 || b2 }
diff --git a/hake.cabal b/hake.cabal
--- a/hake.cabal
+++ b/hake.cabal
@@ -1,5 +1,5 @@
 Name:		hake
-Version:	1.3.5
+Version:	1.3.6
 License:	GPL
 License-file:	LICENSE
 Author:		Yoshikuni Jujo
@@ -78,9 +78,11 @@
   GHC-Options:		-Wall
   Build-Depends:	base<=4.2.0.3, old-time, mtl, filepath
   Exposed-Modules:	Development.Hake, Development.Hake.OldFunSet, Development.Hake.FunSet, Development.Hake.FunSetRaw, Development.Hake.FunSetIO
-  Other-Modules:	Development.Hake.Variables, Development.Hake.Types, Development.Hake.Tools, Development.Hake.RunHake, Development.Hake.Core
+  Other-Modules:	Development.Hake.Variables, Development.Hake.Types,
+    Development.Hake.Tools, Development.Hake.RunHake, Development.Hake.Core,
+    Development.Hake.Tribial, Development.Hake.DirectoryTools
 
 Executable hake
   GHC-Options:		-Wall
-  Build-Depends:	directory, process, yjtools >= 0.9.9, regexpr >= 0.5.1
+  Build-Depends:	directory, process, regexpr >= 0.5.1, yjtools >= 0.9.10
   Main-Is:		Main.hs
