aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSam Ravnborg <sam@mars.ravnborg.org>2006-08-08 14:43:39 -0400
committerSam Ravnborg <sam@neptun.ravnborg.org>2006-09-25 03:01:49 -0400
commit12715d20af9fd9179daca7a1cd2cf3db3c2c494f (patch)
tree0dc3e2a0523fb20eb01c1a5b38d13b93acd50cfe /scripts
parent9e157a5aa899f1ef73780e4755b57ddeb9225079 (diff)
kbuild: modpost on vmlinux regardless of CONFIG_MODULES
Based on patch from: Magnus Damm <magnus@valinux.co.jp> This has the advantage that all section mismatch checks are run regardless of modules being enabled or not. When running modpost on vmlinux output: MODPOST vmlinux When running modpost on modules output count of modules like this: MODPOST 5 modules Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile2
-rw-r--r--scripts/Makefile.modpost12
2 files changed, 10 insertions, 4 deletions
diff --git a/scripts/Makefile b/scripts/Makefile
index d531a1fcef0c..ea41de8fb7f5 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -19,7 +19,7 @@ always := $(hostprogs-y)
19hostprogs-y += unifdef 19hostprogs-y += unifdef
20 20
21subdir-$(CONFIG_MODVERSIONS) += genksyms 21subdir-$(CONFIG_MODVERSIONS) += genksyms
22subdir-$(CONFIG_MODULES) += mod 22subdir-y += mod
23 23
24# Let clean descend into subdirs 24# Let clean descend into subdirs
25subdir- += basic kconfig package 25subdir- += basic kconfig package
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index 0a64688c2b5d..9137df2f9290 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -51,19 +51,25 @@ _modpost: $(modules)
51 51
52# Step 2), invoke modpost 52# Step 2), invoke modpost
53# Includes step 3,4 53# Includes step 3,4
54quiet_cmd_modpost = MODPOST 54quiet_cmd_modpost = MODPOST $(words $(filter-out vmlinux FORCE, $^)) modules
55 cmd_modpost = scripts/mod/modpost \ 55 cmd_modpost = scripts/mod/modpost \
56 $(if $(CONFIG_MODVERSIONS),-m) \ 56 $(if $(CONFIG_MODVERSIONS),-m) \
57 $(if $(CONFIG_MODULE_SRCVERSION_ALL),-a,) \ 57 $(if $(CONFIG_MODULE_SRCVERSION_ALL),-a,) \
58 $(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \ 58 $(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \
59 $(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \ 59 $(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \
60 $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \ 60 $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \
61 $(filter-out FORCE,$^) 61 $(wildcard vmlinux) $(filter-out FORCE,$^)
62 62
63PHONY += __modpost 63PHONY += __modpost
64__modpost: $(wildcard vmlinux) $(modules:.ko=.o) FORCE 64__modpost: $(modules:.ko=.o) FORCE
65 $(call cmd,modpost) 65 $(call cmd,modpost)
66 66
67quiet_cmd_kernel-mod = MODPOST $@
68 cmd_kernel-mod = $(cmd_modpost)
69
70vmlinux: FORCE
71 $(call cmd,kernel-mod)
72
67# Declare generated files as targets for modpost 73# Declare generated files as targets for modpost
68$(symverfile): __modpost ; 74$(symverfile): __modpost ;
69$(modules:.ko=.mod.c): __modpost ; 75$(modules:.ko=.mod.c): __modpost ;