Defer closing of depend file

This commit is contained in:
Rangi42
2024-03-27 11:44:26 -04:00
parent 2ef5e807f8
commit 912a1504ec
5 changed files with 22 additions and 27 deletions

View File

@@ -142,10 +142,10 @@ void fstk_SetPreIncludeFile(std::string const &path) {
}
static void printDep(std::string const &path) {
if (dependfile) {
fprintf(dependfile, "%s: %s\n", targetFileName.c_str(), path.c_str());
if (dependFile) {
fprintf(dependFile, "%s: %s\n", targetFileName.c_str(), path.c_str());
if (generatePhonyDeps)
fprintf(dependfile, "%s:\n", path.c_str());
fprintf(dependFile, "%s:\n", path.c_str());
}
}