diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2011-05-14 12:06:36 +0200 | 
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2011-05-14 12:06:36 +0200 | 
| commit | a18f22a968de17b29f2310cdb7ba69163e65ec15 (patch) | |
| tree | a7d56d88fad5e444d7661484109758a2f436129e /scripts/basic | |
| parent | a1c57e0fec53defe745e64417eacdbd3618c3e66 (diff) | |
| parent | 798778b8653f64b7b2162ac70eca10367cff6ce8 (diff) | |
Merge branch 'consolidate-clksrc-i8253' of master.kernel.org:~rmk/linux-2.6-arm into timers/clocksource
Conflicts:
	arch/ia64/kernel/cyclone.c
	arch/mips/kernel/i8253.c
	arch/x86/kernel/i8253.c
Reason: Resolve conflicts so further cleanups do not conflict further
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'scripts/basic')
| -rw-r--r-- | scripts/basic/fixdep.c | 21 | 
1 files changed, 19 insertions, 2 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)  	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;  	char *end = m + len;  	char *p;  	char s[PATH_MAX]; +	int first;  	p = strchr(m, ':');  	if (!p) { @@ -322,11 +328,11 @@ 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(); +	first = 1;  	while (m < end) {  		while (m < end && (*m == ' ' || *m == '\\' || *m == '\n'))  			m++; @@ -340,9 +346,20 @@ 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 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) { +				printf("source_%s := %s\n\n", target, s); +				printf("deps_%s := \\\n", target); +			} else +				printf("  %s \\\n", s);  			do_config_file(s);  		} +		first = 0;  		m = p + 1;  	}  	printf("\n%s: $(deps_%s)\n\n", target, target); | 
