summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>2002-06-17 00:22:37 -0500
committerKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>2002-06-17 00:22:37 -0500
commit4a6db0791528c220655b063cf13fefc8470dbfee (patch)
tree59e1bed799b849a8ea336544f28966ba12442a9c
parentc51db436049fddda605c8a7907d2f1a71edd31eb (diff)
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 <file> ...") We now add targets for all the previously included files, so make will just ignore them if they disappear.
-rw-r--r--Rules.make2
-rw-r--r--scripts/fixdep.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/Rules.make b/Rules.make
index 6ef827d3df39..7db5301ea7db 100644
--- a/Rules.make
+++ b/Rules.make
@@ -446,7 +446,7 @@ if_changed = $(if $(strip $? \
# execute the command and also postprocess generated .d dependencies
# file
-if_changed_dep = $(if $(strip $? \
+if_changed_dep = $(if $(strip $? $(filter-out FORCE $(wildcard $^),$^)\
$(filter-out $(cmd_$(1)),$(cmd_$@))\
$(filter-out $(cmd_$@),$(cmd_$(1)))),\
@set -e; \
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)