Fix depfiles only outputting half of the dependencies

Jesus christ what is this slip up even lmao
This commit is contained in:
mid-kid 2025-05-30 01:52:41 +02:00
parent 69c2257713
commit 6693130c79
2 changed files with 18 additions and 3 deletions

View File

@ -305,8 +305,6 @@ __cdecl void depfile_build(char *header_struct, char *depfile_struct, mwstring *
// Print all header dependencies
for (int cur_header = 0; cur_header < num_headers; cur_header++) {
num_headers--;
mwpath header;
char header_full[PATH_MAX];
@ -341,7 +339,8 @@ __cdecl void depfile_build(char *header_struct, char *depfile_struct, mwstring *
char *header_escaped = depfile_escape_spaces(
strchr(header_full, ' ') != NULL, escape_buf, header_full);
sprintf(strbuf, "\t%s %s\n", header_escaped, num_headers ? "\\" : "");
sprintf(strbuf, "\t%s %s\n", header_escaped,
(cur_header < num_headers - 1) ? "\\" : "");
if (string_append(string, strbuf, strlen(strbuf))) goto outofmem;
}
return;

View File

@ -15,3 +15,19 @@ deps.o: deps.c \
inc/deps14.h \
inc/deps15.h \
inc/deps16.h \
inc/deps17.h \
inc/deps18.h \
inc/deps19.h \
inc/deps20.h \
inc/deps21.h \
inc/deps22.h \
inc/deps23.h \
inc/deps24.h \
inc/deps25.h \
inc/deps26.h \
inc/deps27.h \
inc/deps28.h \
inc/deps29.h \
inc/deps30.h \
inc/deps31.h \
inc/deps32.h