From 4a6db0791528c220655b063cf13fefc8470dbfee Mon Sep 17 00:00:00 2001 From: Kai Germaschewski Date: Mon, 17 Jun 2002 00:22:37 -0500 Subject: kbuild: Handle removed headers New and old way to handle dependencies would choke when a file #include'd by other files was removed, since the dependency on it was still recorded, but since it was gone, make has no idea what to do about it (and would complain with "No rule to make ...") We now add targets for all the previously included files, so make will just ignore them if they disappear. --- scripts/fixdep.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/fixdep.c b/scripts/fixdep.c index b5d7bee8efc7..db45bd1888c0 100644 --- a/scripts/fixdep.c +++ b/scripts/fixdep.c @@ -292,7 +292,7 @@ void parse_dep_file(void *map, size_t len) exit(1); } memcpy(s, m, p-m); s[p-m] = 0; - printf("%s: \\\n", target); + printf("deps_%s := \\\n", target); m = p+1; clear_config(); @@ -314,7 +314,8 @@ void parse_dep_file(void *map, size_t len) } m = p + 1; } - printf("\n"); + printf("\n%s: $(deps_%s)\n\n", target, target); + printf("$(deps_%s):\n", target); } void print_deps(void) -- cgit v1.2.3