···315315 char *end = m + len;316316 char *p;317317 char s[PATH_MAX];318318+ int first;318319319320 p = strchr(m, ':');320321 if (!p) {···328327329328 clear_config();330329330330+ first = 1;331331 while (m < end) {332332 while (m < end && (*m == ' ' || *m == '\\' || *m == '\n'))333333 m++;···342340 if (strrcmp(s, "include/generated/autoconf.h") &&343341 strrcmp(s, "arch/um/include/uml-config.h") &&344342 strrcmp(s, ".ver")) {345345- printf(" %s \\\n", s);343343+ /*344344+ * Do not output the first dependency (the345345+ * source file), so that kbuild is not confused346346+ * if a .c file is rewritten into .S or vice347347+ * versa.348348+ */349349+ if (!first)350350+ printf(" %s \\\n", s);346351 do_config_file(s);347352 }353353+ first = 0;348354 m = p + 1;349355 }350356 printf("\n%s: $(deps_%s)\n\n", target, target);