summaryrefslogtreecommitdiffhomepage
path: root/builder.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2024-05-03 12:24:13 +0200
committerRoland Reichwein <mail@reichwein.it>2024-05-03 12:24:13 +0200
commit6669794434cb9f472aafce126162b9b81389df5f (patch)
treeeb0bce92f42648784cecf704f1a7569ca30b1ba6 /builder.cpp
parent5ecd32cb842defe38e14dcaeb0caa2d98356a0bb (diff)
Rename to ymake
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()));
}
}