diff options
| author | Ingo Molnar <mingo@elte.hu> | 2011-03-15 03:29:44 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2011-03-15 03:29:44 -0400 |
| commit | 8460b3e5bc64955aeefdd8357b3bf7b5ff79b3f2 (patch) | |
| tree | 7e5f6d050b72ab08a4497e82a4a103fefb086e80 /scripts | |
| parent | 56396e6823fe9b42fe9cf9403d6ed67756255f70 (diff) | |
| parent | 521cb40b0c44418a4fd36dc633f575813d59a43d (diff) | |
Merge commit 'v2.6.38' into x86/mm
Conflicts:
arch/x86/mm/numa_64.c
Merge reason: Resolve the conflict, update the branch to .38.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/basic/fixdep.c | 21 | ||||
| -rw-r--r-- | scripts/mod/sumversion.c | 19 |
2 files changed, 36 insertions, 4 deletions
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index c9a16abacab..291228e2598 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c | |||
| @@ -309,12 +309,18 @@ static void do_config_file(const char *filename) | |||
| 309 | close(fd); | 309 | close(fd); |
| 310 | } | 310 | } |
| 311 | 311 | ||
| 312 | /* | ||
| 313 | * Important: The below generated source_foo.o and deps_foo.o variable | ||
| 314 | * assignments are parsed not only by make, but also by the rather simple | ||
| 315 | * parser in scripts/mod/sumversion.c. | ||
| 316 | */ | ||
| 312 | static void parse_dep_file(void *map, size_t len) | 317 | static void parse_dep_file(void *map, size_t len) |
| 313 | { | 318 | { |
| 314 | char *m = map; | 319 | char *m = map; |
| 315 | char *end = m + len; | 320 | char *end = m + len; |
| 316 | char *p; | 321 | char *p; |
| 317 | char s[PATH_MAX]; | 322 | char s[PATH_MAX]; |
| 323 | int first; | ||
| 318 | 324 | ||
| 319 | p = strchr(m, ':'); | 325 | p = strchr(m, ':'); |
| 320 | if (!p) { | 326 | if (!p) { |
| @@ -322,11 +328,11 @@ static void parse_dep_file(void *map, size_t len) | |||
| 322 | exit(1); | 328 | exit(1); |
| 323 | } | 329 | } |
| 324 | memcpy(s, m, p-m); s[p-m] = 0; | 330 | memcpy(s, m, p-m); s[p-m] = 0; |
| 325 | printf("deps_%s := \\\n", target); | ||
| 326 | m = p+1; | 331 | m = p+1; |
| 327 | 332 | ||
| 328 | clear_config(); | 333 | clear_config(); |
| 329 | 334 | ||
| 335 | first = 1; | ||
| 330 | while (m < end) { | 336 | while (m < end) { |
| 331 | while (m < end && (*m == ' ' || *m == '\\' || *m == '\n')) | 337 | while (m < end && (*m == ' ' || *m == '\\' || *m == '\n')) |
| 332 | m++; | 338 | m++; |
| @@ -340,9 +346,20 @@ static void parse_dep_file(void *map, size_t len) | |||
| 340 | if (strrcmp(s, "include/generated/autoconf.h") && | 346 | if (strrcmp(s, "include/generated/autoconf.h") && |
| 341 | strrcmp(s, "arch/um/include/uml-config.h") && | 347 | strrcmp(s, "arch/um/include/uml-config.h") && |
| 342 | strrcmp(s, ".ver")) { | 348 | strrcmp(s, ".ver")) { |
| 343 | printf(" %s \\\n", s); | 349 | /* |
| 350 | * Do not list the source file as dependency, so that | ||
| 351 | * kbuild is not confused if a .c file is rewritten | ||
| 352 | * into .S or vice versa. Storing it in source_* is | ||
| 353 | * needed for modpost to compute srcversions. | ||
| 354 | */ | ||
| 355 | if (first) { | ||
| 356 | printf("source_%s := %s\n\n", target, s); | ||
| 357 | printf("deps_%s := \\\n", target); | ||
| 358 | } else | ||
| 359 | printf(" %s \\\n", s); | ||
| 344 | do_config_file(s); | 360 | do_config_file(s); |
| 345 | } | 361 | } |
| 362 | first = 0; | ||
| 346 | m = p + 1; | 363 | m = p + 1; |
| 347 | } | 364 | } |
| 348 | printf("\n%s: $(deps_%s)\n\n", target, target); | 365 | printf("\n%s: $(deps_%s)\n\n", target, target); |
diff --git a/scripts/mod/sumversion.c b/scripts/mod/sumversion.c index ecf9c7dc182..9dfcd6d988d 100644 --- a/scripts/mod/sumversion.c +++ b/scripts/mod/sumversion.c | |||
| @@ -300,8 +300,8 @@ static int is_static_library(const char *objfile) | |||
| 300 | return 0; | 300 | return 0; |
| 301 | } | 301 | } |
| 302 | 302 | ||
| 303 | /* We have dir/file.o. Open dir/.file.o.cmd, look for deps_ line to | 303 | /* We have dir/file.o. Open dir/.file.o.cmd, look for source_ and deps_ line |
| 304 | * figure out source file. */ | 304 | * to figure out source files. */ |
| 305 | static int parse_source_files(const char *objfile, struct md4_ctx *md) | 305 | static int parse_source_files(const char *objfile, struct md4_ctx *md) |
| 306 | { | 306 | { |
| 307 | char *cmd, *file, *line, *dir; | 307 | char *cmd, *file, *line, *dir; |
| @@ -340,6 +340,21 @@ static int parse_source_files(const char *objfile, struct md4_ctx *md) | |||
| 340 | */ | 340 | */ |
| 341 | while ((line = get_next_line(&pos, file, flen)) != NULL) { | 341 | while ((line = get_next_line(&pos, file, flen)) != NULL) { |
| 342 | char* p = line; | 342 | char* p = line; |
| 343 | |||
| 344 | if (strncmp(line, "source_", sizeof("source_")-1) == 0) { | ||
| 345 | p = strrchr(line, ' '); | ||
| 346 | if (!p) { | ||
| 347 | warn("malformed line: %s\n", line); | ||
| 348 | goto out_file; | ||
| 349 | } | ||
| 350 | p++; | ||
| 351 | if (!parse_file(p, md)) { | ||
| 352 | warn("could not open %s: %s\n", | ||
| 353 | p, strerror(errno)); | ||
| 354 | goto out_file; | ||
| 355 | } | ||
| 356 | continue; | ||
| 357 | } | ||
| 343 | if (strncmp(line, "deps_", sizeof("deps_")-1) == 0) { | 358 | if (strncmp(line, "deps_", sizeof("deps_")-1) == 0) { |
| 344 | check_files = 1; | 359 | check_files = 1; |
| 345 | continue; | 360 | continue; |
