Loading parser.cpp +8 −0 Changes for parser.cpp: 8 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -118,6 +118,14 @@ bool Parser::parse_file(const std::string& filepath, Makefile& mf) { mf.base_dir = fs::path(filepath).parent_path().string(); if (mf.base_dir.empty()) mf.base_dir = "."; // Track MAKEFILE_LIST so makefiles can compute their own path // (this-makefile := $(lastword $(MAKEFILE_LIST))), as Kbuild does. { auto& ml = mf.variables["MAKEFILE_LIST"]; ml.value += (ml.value.empty() ? "" : " ") + filepath; ml.flavor = VarFlavor::Simple; } std::string content((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>()); return parse_string(content, mf); Loading Loading
parser.cpp +8 −0 Changes for parser.cpp: 8 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -118,6 +118,14 @@ bool Parser::parse_file(const std::string& filepath, Makefile& mf) { mf.base_dir = fs::path(filepath).parent_path().string(); if (mf.base_dir.empty()) mf.base_dir = "."; // Track MAKEFILE_LIST so makefiles can compute their own path // (this-makefile := $(lastword $(MAKEFILE_LIST))), as Kbuild does. { auto& ml = mf.variables["MAKEFILE_LIST"]; ml.value += (ml.value.empty() ? "" : " ") + filepath; ml.flavor = VarFlavor::Simple; } std::string content((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>()); return parse_string(content, mf); Loading