Skip to content

Commit

Permalink
Fix issue 12354: rdmd --makedep(end|file) doesn't output empty rules …
Browse files Browse the repository at this point in the history
…for all source files

Now rdmd --makedep(end|file) will print an empty rule for each source
file.
  • Loading branch information
leandro-lucarella-sociomantic committed Mar 19, 2014
1 parent 12e73a2 commit 314d92e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rdmd.d
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,12 @@ void writeDeps(string exe, string root, in string[string] myDeps, File fo)
fo.write(' ', mod);
}
fo.writeln();
fo.writeln();
fo.writeln(root, " :");
foreach (mod, _; myDeps)
{
fo.writeln(mod, " :");
}
}

bool inALibrary(string source, string object)
Expand Down
2 changes: 2 additions & 0 deletions rdmd_test.d
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ void runTests()
assert(res.output.canFind("depMod_ : "));
assert(res.output.canFind("depMod_.d"));
assert(res.output.replace(r"\", "/").canFind("dsubpack/submod.d"));
assert(res.output.replace(r"\", "/").canFind("dsubpack/submod.d :"));

/* Test --makedepfile. */

Expand All @@ -224,6 +225,7 @@ void runTests()
assert(output.canFind("depModFail_ : "));
assert(output.canFind("depModFail_.d"));
assert(output.replace(r"\", "/").canFind("dsubpack/submod.d"));
assert(output.replace(r"\", "/").canFind("dsubpack/submod.d :"));
assert(res.status == 0, res.output); // only built, assert(0) not called.

/* Test signal propagation through exit codes */
Expand Down

0 comments on commit 314d92e

Please sign in to comment.