diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-02-22 00:08:09 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-02-22 00:08:09 +0100 |
commit | 99273ac4dc4db0cfb38fec65d4afb8a0f6bc6e58 (patch) | |
tree | 6300912c3322a6567f9091d8bfb8b0334f290d87 | |
parent | Docbook: add fs/eventfd.c and fix typos in it (diff) | |
parent | fixdep: Do not record dependency on the source file itself (diff) | |
download | linux-99273ac4dc4db0cfb38fec65d4afb8a0f6bc6e58.tar.xz linux-99273ac4dc4db0cfb38fec65d4afb8a0f6bc6e58.zip |
Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
fixdep: Do not record dependency on the source file itself
-rw-r--r-- | scripts/basic/fixdep.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index c9a16abacab4..6c94c6ce2925 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c @@ -315,6 +315,7 @@ static void parse_dep_file(void *map, size_t len) char *end = m + len; char *p; char s[PATH_MAX]; + int first; p = strchr(m, ':'); if (!p) { @@ -327,6 +328,7 @@ static void parse_dep_file(void *map, size_t len) clear_config(); + first = 1; while (m < end) { while (m < end && (*m == ' ' || *m == '\\' || *m == '\n')) m++; @@ -340,9 +342,17 @@ static void parse_dep_file(void *map, size_t len) if (strrcmp(s, "include/generated/autoconf.h") && strrcmp(s, "arch/um/include/uml-config.h") && strrcmp(s, ".ver")) { - printf(" %s \\\n", s); + /* + * Do not output the first dependency (the + * source file), so that kbuild is not confused + * if a .c file is rewritten into .S or vice + * versa. + */ + if (!first) + printf(" %s \\\n", s); do_config_file(s); } + first = 0; m = p + 1; } printf("\n%s: $(deps_%s)\n\n", target, target); |