diff options
| author | Len Brown <len.brown@intel.com> | 2011-03-23 09:33:54 +0300 | 
|---|---|---|
| committer | Len Brown <len.brown@intel.com> | 2011-03-23 09:33:54 +0300 | 
| commit | 5c129a8600100a5d0f5fdbc1014c5dba1d307bc4 (patch) | |
| tree | 9877a14b49cff43d0ba10c12f407ec551c77daa5 /scripts/basic/fixdep.c | |
| parent | 797b10a07069e153d41aedb4ae8e76660279e2ee (diff) | |
| parent | 521cb40b0c44418a4fd36dc633f575813d59a43d (diff) | |
| download | linux-5c129a8600100a5d0f5fdbc1014c5dba1d307bc4.tar.xz | |
Merge commit 'v2.6.38' into release
Diffstat (limited to 'scripts/basic/fixdep.c')
| -rw-r--r-- | scripts/basic/fixdep.c | 19 | 
1 files changed, 13 insertions, 6 deletions
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index 6c94c6ce2925..291228e25984 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c @@ -309,6 +309,11 @@ static void do_config_file(const char *filename)  	close(fd);  } +/* + * Important: The below generated source_foo.o and deps_foo.o variable + * assignments are parsed not only by make, but also by the rather simple + * parser in scripts/mod/sumversion.c. + */  static void parse_dep_file(void *map, size_t len)  {  	char *m = map; @@ -323,7 +328,6 @@ static void parse_dep_file(void *map, size_t len)  		exit(1);  	}  	memcpy(s, m, p-m); s[p-m] = 0; -	printf("deps_%s := \\\n", target);  	m = p+1;  	clear_config(); @@ -343,12 +347,15 @@ static void parse_dep_file(void *map, size_t len)  		    strrcmp(s, "arch/um/include/uml-config.h") &&  		    strrcmp(s, ".ver")) {  			/* -			 * 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. +			 * Do not list the source file as dependency, so that +			 * kbuild is not confused if a .c file is rewritten +			 * into .S or vice versa. Storing it in source_* is +			 * needed for modpost to compute srcversions.  			 */ -			if (!first) +			if (first) { +				printf("source_%s := %s\n\n", target, s); +				printf("deps_%s := \\\n", target); +			} else  				printf("  %s \\\n", s);  			do_config_file(s);  		}  | 
