summaryrefslogtreecommitdiffhomepage
path: root/builder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'builder.cpp')
-rw-r--r--builder.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/builder.cpp b/builder.cpp
index 0493bb3..ee9c16b 100644
--- a/builder.cpp
+++ b/builder.cpp
@@ -29,12 +29,12 @@ using namespace std::string_literals;
namespace {
fs::path get_target(const pt::ptree& ptree) {
- return ptree.get<std::string>("xmake.build.name");
+ return ptree.get<std::string>("ymake.build.name");
}
std::vector<fs::path> get_sources(const pt::ptree& ptree) {
std::vector<fs::path> sources;
- for (const pt::ptree::value_type &v: ptree.get_child("xmake.build")) {
+ for (const pt::ptree::value_type &v: ptree.get_child("ymake.build")) {
if (v.first == "source")
sources.push_back(v.second.data());
}
@@ -120,7 +120,8 @@ namespace {
fs::path p_obj{p};
p_obj.replace_extension("o");
std::vector<fs::path> deps {make_depfile_from(p)};
- fs::remove(depfile_name_from(p));
+ // keep .d files for now to speed dependencies detection on following runs
+ //fs::remove(depfile_name_from(p));
dependencies.emplace(p_obj, deps);
}
return dependencies;
@@ -277,10 +278,9 @@ void Builder::clean() {
if (fs::exists(i)) {
commands.push_back(fmt::format("rm -f {}", i.string()));
}
- fs::path dep{i};
- dep.replace_extension("d");
- if (fs::exists(dep)) {
- commands.push_back(fmt::format("rm -f {}", dep.string()));
+ fs::path depfile{depfile_name_from(i)};
+ if (fs::exists(depfile)) {
+ commands.push_back(fmt::format("rm -f {}", depfile.string()));
}
}