Skip to content

Commit

Permalink
Fix ninja build with spaces or colons
Browse files Browse the repository at this point in the history
  • Loading branch information
atilaneves committed Sep 7, 2023
1 parent a89dc48 commit 9eec4f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
6 changes: 3 additions & 3 deletions payload/reggae/backend/ninja.d
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ struct Ninja {

//includes rerunning reggae
const(NinjaEntry)[] allBuildEntries() @safe {
import std.array: join;
import std.array: array;
import std.algorithm: sort, uniq;
import std.range: chain;

const files =
flattenEntriesInBuildLine(_options.reggaeFileDependencies)
~ " " ~ _srcDirs.sort.uniq.join(" ")
flattenEntriesInBuildLine(chain(_options.reggaeFileDependencies, _srcDirs.sort.uniq).array);
;
auto paramLines = _options.oldNinja ? [] : ["pool = console"];

Expand Down
8 changes: 2 additions & 6 deletions payload/reggae/backend/package.d
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,8 @@ package string[] maybeAddDirDependencies(
if(srcs.empty)
return [];

auto dirs = srcs
return srcs
.map!(t => t.expandOutputs(projectPath)[0])
.map!dirName;

return dirs
// otherwise ninja/make will emit this as 2 or more dependencies
.filter!(d => !d.canFind(" "))
.map!dirName
.array;
}

0 comments on commit 9eec4f2

Please sign in to comment.