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.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/handle_dep.cc b/src/handle_dep.cc
index 2d6f3ff..1e8b3c2 100644
--- a/src/handle_dep.cc
+++ b/src/handle_dep.cc
@@ -10,7 +10,7 @@ namespace fs = boost::filesystem;
#include "boosty.h"
boost::unordered_set<std::string> dependencies;
-const char *make_command = NULL;
+boost::optional<std::string> make_command;
void handle_dep(const std::string &filename)
{
@@ -23,7 +23,7 @@ void handle_dep(const std::string &filename)
}
if (!fs::exists(filepath) && make_command) {
std::stringstream buf;
- buf << make_command << " '" << boost::regex_replace(filename, boost::regex("'"), "'\\''") << "'";
+ buf << *make_command << " '" << boost::regex_replace(filename, boost::regex("'"), "'\\''") << "'";
system(buf.str().c_str()); // FIXME: Handle error
}
}
contact: Jan Huwald // Impressum