Skip to content

Commit

Permalink
Fix build with multiple outputs and subninja.
Browse files Browse the repository at this point in the history
  • Loading branch information
dillof committed Dec 26, 2023
1 parent 83e5d2b commit bf4cb05
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/Build.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Build::Build(Tokenizer& tokenizer) {
outputs = Text{ tokenizer, Tokenizer::TokenType::COLON };
for (auto& element: outputs) {
element.type = Text::ElementType::BUILD_FILE;
if (element.type == Text::ElementType::WORD) {
element.type = Text::ElementType::BUILD_FILE;
}
}
inputs = Text{tokenizer, Tokenizer::TokenType::NEWLINE};
bindings = Bindings{ tokenizer };
Expand Down
2 changes: 1 addition & 1 deletion src/File.cc
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ void File::create_output() const {
if (!subninjas.empty()) {
stream << std::endl;
for (auto& subninja: subninjas) {
stream << "subninja " << replace_extension(subninja, "ninja") << std::endl;
stream << "subninja " << replace_extension(subninja, "ninja").string() << std::endl;
}
}
}
Expand Down

0 comments on commit bf4cb05

Please sign in to comment.