summaryrefslogtreecommitdiff
path: root/src/handle_dep.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/handle_dep.cc')
-rw-r--r--src/handle_dep.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/handle_dep.cc b/src/handle_dep.cc
index cbf7157..0bebb70 100644
--- a/src/handle_dep.cc
+++ b/src/handle_dep.cc
@@ -6,22 +6,24 @@
#include <boost/foreach.hpp>
#include <boost/regex.hpp>
#include <boost/filesystem.hpp>
-using namespace boost::filesystem;
+namespace fs = boost::filesystem;
#include "boosty.h"
+#include <set>
-boost::unordered_set<std::string> dependencies;
+//boost::unordered_set<std::string> dependencies;
+std::set<std::string> dependencies;
const char *make_command = NULL;
void handle_dep(const std::string &filename)
{
- path filepath(filename);
+ fs::path filepath(filename);
if ( boosty::is_absolute( filepath )) {
dependencies.insert(filename);
}
else {
- dependencies.insert((current_path() / filepath).string());
+ dependencies.insert((fs::current_path() / filepath).string());
}
- if (!exists(filepath) && make_command) {
+ if (!fs::exists(filepath) && make_command) {
std::stringstream buf;
buf << make_command << " '" << boost::regex_replace(filename, boost::regex("'"), "'\\''") << "'";
system(buf.str().c_str()); // FIXME: Handle error
contact: Jan Huwald // Impressum