From 6669794434cb9f472aafce126162b9b81389df5f Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Fri, 3 May 2024 12:24:13 +0200 Subject: Rename to ymake --- builder.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'builder.cpp') 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("xmake.build.name"); + return ptree.get("ymake.build.name"); } std::vector get_sources(const pt::ptree& ptree) { std::vector 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 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())); } } -- cgit v1.2.3