-/* $Id$
-
-This file is part of builder
-Copyright © 2007-2009 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
+#include <msp/core/maputils.h>
#include <msp/fs/stat.h>
-#include <msp/io/except.h>
#include <msp/io/file.h>
#include <msp/io/print.h>
#include <msp/strings/utils.h>
const StringList &DependencyCache::get_deps(const string &tgt) const
{
- DepsMap::const_iterator i = deps.find(tgt);
- if(i==deps.end())
- throw KeyError("Unknown dependencies", tgt);
-
- return i->second;
+ return get_item(deps, tgt);
}
void DependencyCache::save() const
deps[parts[0]] = StringList(parts.begin()+1, parts.end());
}
- mtime = Time::TimeStamp::from_unixtime(FS::stat(fn).st_mtime);
+ mtime = FS::stat(fn).get_modify_time();
}
- catch(const IO::FileNotFound &)
+ catch(const IO::file_not_found &)
{ }
}