aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/basic/fixdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/basic/fixdep.c')
-rw-r--r--scripts/basic/fixdep.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index 9f9238eaec19..dfba77b5d0c3 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -109,7 +109,6 @@
109#include <string.h> 109#include <string.h>
110#include <stdlib.h> 110#include <stdlib.h>
111#include <stdio.h> 111#include <stdio.h>
112#include <limits.h>
113#include <ctype.h> 112#include <ctype.h>
114 113
115int insert_extra_deps; 114int insert_extra_deps;
@@ -304,7 +303,6 @@ static void *read_file(const char *filename)
304static void parse_dep_file(char *m) 303static void parse_dep_file(char *m)
305{ 304{
306 char *p; 305 char *p;
307 char s[PATH_MAX];
308 int is_last, is_target; 306 int is_last, is_target;
309 int saw_any_target = 0; 307 int saw_any_target = 0;
310 int is_first_dep = 0; 308 int is_first_dep = 0;
@@ -330,16 +328,14 @@ static void parse_dep_file(char *m)
330 /* The /next/ file is the first dependency */ 328 /* The /next/ file is the first dependency */
331 is_first_dep = 1; 329 is_first_dep = 1;
332 } else { 330 } else {
333 /* Save this token/filename */ 331 *p = '\0';
334 memcpy(s, m, p-m);
335 s[p - m] = 0;
336 332
337 /* Ignore certain dependencies */ 333 /* Ignore certain dependencies */
338 if (strrcmp(s, "include/generated/autoconf.h") && 334 if (strrcmp(m, "include/generated/autoconf.h") &&
339 strrcmp(s, "include/generated/autoksyms.h") && 335 strrcmp(m, "include/generated/autoksyms.h") &&
340 strrcmp(s, "arch/um/include/uml-config.h") && 336 strrcmp(m, "arch/um/include/uml-config.h") &&
341 strrcmp(s, "include/linux/kconfig.h") && 337 strrcmp(m, "include/linux/kconfig.h") &&
342 strrcmp(s, ".ver")) { 338 strrcmp(m, ".ver")) {
343 /* 339 /*
344 * Do not list the source file as dependency, 340 * Do not list the source file as dependency,
345 * so that kbuild is not confused if a .c file 341 * so that kbuild is not confused if a .c file
@@ -360,15 +356,15 @@ static void parse_dep_file(char *m)
360 if (!saw_any_target) { 356 if (!saw_any_target) {
361 saw_any_target = 1; 357 saw_any_target = 1;
362 printf("source_%s := %s\n\n", 358 printf("source_%s := %s\n\n",
363 target, s); 359 target, m);
364 printf("deps_%s := \\\n", 360 printf("deps_%s := \\\n",
365 target); 361 target);
366 } 362 }
367 is_first_dep = 0; 363 is_first_dep = 0;
368 } else 364 } else
369 printf(" %s \\\n", s); 365 printf(" %s \\\n", m);
370 366
371 buf = read_file(s); 367 buf = read_file(m);
372 parse_config_file(buf); 368 parse_config_file(buf);
373 free(buf); 369 free(buf);
374 } 370 }