]> git.neil.brown.name Git - history.git/commitdiff
kbuild: Fix dependencies for generated .mod.o files
authorKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Wed, 2 Apr 2003 08:12:51 +0000 (02:12 -0600)
committerKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Wed, 2 Apr 2003 08:12:51 +0000 (02:12 -0600)
For some reason which I cannot remember, we didn't use the automatic
dependency generation for the generated .mod.[co] files. However, we do
of course need dependency information for those, too, they need to be updated
when e.g. the kernel version number changes.

scripts/Makefile.modpost

index 5cf5fdf224828a7d91e5e1f009b40742e3005af4..9416ae154422d8f1b9ba7e85e819eaf6413c5223 100644 (file)
@@ -35,10 +35,11 @@ targets += $(modules)
 # Compile version info for unresolved symbols
 
 quiet_cmd_cc_o_c = CC      $@
-      cmd_cc_o_c = $(CC) $(CFLAGS) $(CFLAGS_MODULE) -c -o $@ $<
+      cmd_cc_o_c = $(CC) -Wp,-MD,$(depfile) $(CFLAGS) $(CFLAGS_MODULE) \
+                  -c -o $@ $<
 
 $(modules:.ko=.mod.o): %.mod.o: %.mod.c FORCE
-       $(call if_changed,cc_o_c)
+       $(call if_changed_dep,cc_o_c)
 
 targets += $(modules:.ko=.mod.o)