aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>2003-02-14 08:16:21 -0600
committerKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>2003-02-14 08:16:21 -0600
commit0e7d983baf0e669867183d9fecdeb7b83ac1940b (patch)
treeeaab7e426df7cc4e35bcb3b306e9aa5da710f600 /Makefile
parent15f1049d9f873263d5ed26ebc31ca099e807147d (diff)
downloadhistory-0e7d983baf0e669867183d9fecdeb7b83ac1940b.tar.gz
kbuild: Always postprocess modules
Currently, we are doing the final module link (.ko) at different places (Makefile.build vs Makefile.modver) depending on CONFIG_MODVERSIONS. Apart from being confusing, that also means we have this code path duplicated, and the modversions path most likely gets little testing. It's actually cleaner to just do the final link from Makefile.modver always, performance-wise it's not a noticable difference, since we don't descend in that step, but just use the list of modules generated during the build. This step is also preliminary for doing additional postprocessing, e.g. generating module alias information from PCI / USB device tables.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 5 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index c25201e8608d2c..e6345e30e9acba 100644
--- a/Makefile
+++ b/Makefile
@@ -405,16 +405,14 @@ $(SUBDIRS): prepare
.PHONY: prepare
prepare: include/linux/version.h include/asm include/config/MARKER
-ifdef CONFIG_MODVERSIONS
ifdef KBUILD_MODULES
ifeq ($(origin SUBDIRS),file)
$(Q)rm -rf $(MODVERDIR)
- $(Q)mkdir $(MODVERDIR)
else
@echo '*** Warning: Overriding SUBDIRS on the command line can cause'
- @echo '*** inconsistencies with module symbol versions'
-endif
+ @echo '*** inconsistencies'
endif
+ $(Q)mkdir -p $(MODVERDIR)
endif
@echo ' Starting the build. KBUILD_BUILTIN=$(KBUILD_BUILTIN) KBUILD_MODULES=$(KBUILD_MODULES)'
@@ -518,17 +516,11 @@ all: modules
# Build modules
-.PHONY: modules __modversions
-modules: $(SUBDIRS) __modversions
-
-ifdef CONFIG_MODVERSIONS
-
-__modversions: vmlinux $(SUBDIRS)
- @echo ' Recording module symbol versions.';
+.PHONY: modules
+modules: $(SUBDIRS) $(if $(CONFIG_MODVERSIONS),vmlinux)
+ @echo ' Building modules, stage 2.';
$(Q)$(MAKE) -rR -f scripts/Makefile.modver
-endif
-
# Install modules
.PHONY: modules_install