Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 99273ac4 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* '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
parents 36182185 b7bd1821
Loading
Loading
Loading
Loading
+11 −1
Original line number Original line Diff line number Diff line
@@ -315,6 +315,7 @@ static void parse_dep_file(void *map, size_t len)
	char *end = m + len;
	char *end = m + len;
	char *p;
	char *p;
	char s[PATH_MAX];
	char s[PATH_MAX];
	int first;


	p = strchr(m, ':');
	p = strchr(m, ':');
	if (!p) {
	if (!p) {
@@ -327,6 +328,7 @@ static void parse_dep_file(void *map, size_t len)


	clear_config();
	clear_config();


	first = 1;
	while (m < end) {
	while (m < end) {
		while (m < end && (*m == ' ' || *m == '\\' || *m == '\n'))
		while (m < end && (*m == ' ' || *m == '\\' || *m == '\n'))
			m++;
			m++;
@@ -340,9 +342,17 @@ static void parse_dep_file(void *map, size_t len)
		if (strrcmp(s, "include/generated/autoconf.h") &&
		if (strrcmp(s, "include/generated/autoconf.h") &&
		    strrcmp(s, "arch/um/include/uml-config.h") &&
		    strrcmp(s, "arch/um/include/uml-config.h") &&
		    strrcmp(s, ".ver")) {
		    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.
			 */
			if (!first)
				printf("  %s \\\n", s);
				printf("  %s \\\n", s);
			do_config_file(s);
			do_config_file(s);
		}
		}
		first = 0;
		m = p + 1;
		m = p + 1;
	}
	}
	printf("\n%s: $(deps_%s)\n\n", target, target);
	printf("\n%s: $(deps_%s)\n\n", target, target);