aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.modpost
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-03-29 17:18:49 -0500
committerJeff Garzik <jeff@garzik.org>2006-03-29 17:18:49 -0500
commite02a4cabfcb9a999b74a2e2e6f13ffcb7ff2d606 (patch)
tree2f3db60be4c57eca2a4c3ab3f3122dcf1ec0c624 /scripts/Makefile.modpost
parent600511e86babe3727264a0883a3a264f6fb6caf5 (diff)
parentf3cab8a0b1a772dc8b055b7affa567a366627c9e (diff)
Merge branch 'master'
Diffstat (limited to 'scripts/Makefile.modpost')
-rw-r--r--scripts/Makefile.modpost21
1 files changed, 15 insertions, 6 deletions
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index bf96a61d4b86..0e056cffffdb 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -4,7 +4,7 @@
4# 4#
5# Stage one of module building created the following: 5# Stage one of module building created the following:
6# a) The individual .o files used for the module 6# a) The individual .o files used for the module
7# b) A <module>.o file wich is the .o files above linked together 7# b) A <module>.o file which is the .o files above linked together
8# c) A <module>.mod file in $(MODVERDIR)/, listing the name of the 8# c) A <module>.mod file in $(MODVERDIR)/, listing the name of the
9# the preliminary <module>.o file, plus all .o files 9# the preliminary <module>.o file, plus all .o files
10 10
@@ -32,14 +32,15 @@
32# Step 4 is solely used to allow module versioning in external modules, 32# Step 4 is solely used to allow module versioning in external modules,
33# where the CRC of each module is retrieved from the Module.symers file. 33# where the CRC of each module is retrieved from the Module.symers file.
34 34
35.PHONY: _modpost 35PHONY := _modpost
36_modpost: __modpost 36_modpost: __modpost
37 37
38include .config 38include .config
39include scripts/Kbuild.include 39include scripts/Kbuild.include
40include scripts/Makefile.lib 40include scripts/Makefile.lib
41 41
42symverfile := $(objtree)/Module.symvers 42kernelsymfile := $(objtree)/Module.symvers
43modulesymfile := $(KBUILD_EXTMOD)/Modules.symvers
43 44
44# Step 1), find all modules listed in $(MODVERDIR)/ 45# Step 1), find all modules listed in $(MODVERDIR)/
45__modules := $(sort $(shell grep -h '\.ko' /dev/null $(wildcard $(MODVERDIR)/*.mod))) 46__modules := $(sort $(shell grep -h '\.ko' /dev/null $(wildcard $(MODVERDIR)/*.mod)))
@@ -54,10 +55,12 @@ quiet_cmd_modpost = MODPOST
54 cmd_modpost = scripts/mod/modpost \ 55 cmd_modpost = scripts/mod/modpost \
55 $(if $(CONFIG_MODVERSIONS),-m) \ 56 $(if $(CONFIG_MODVERSIONS),-m) \
56 $(if $(CONFIG_MODULE_SRCVERSION_ALL),-a,) \ 57 $(if $(CONFIG_MODULE_SRCVERSION_ALL),-a,) \
57 $(if $(KBUILD_EXTMOD),-i,-o) $(symverfile) \ 58 $(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \
59 $(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \
60 $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \
58 $(filter-out FORCE,$^) 61 $(filter-out FORCE,$^)
59 62
60.PHONY: __modpost 63PHONY += __modpost
61__modpost: $(wildcard vmlinux) $(modules:.ko=.o) FORCE 64__modpost: $(wildcard vmlinux) $(modules:.ko=.o) FORCE
62 $(call cmd,modpost) 65 $(call cmd,modpost)
63 66
@@ -94,7 +97,7 @@ targets += $(modules)
94# Add FORCE to the prequisites of a target to force it to be always rebuilt. 97# Add FORCE to the prequisites of a target to force it to be always rebuilt.
95# --------------------------------------------------------------------------- 98# ---------------------------------------------------------------------------
96 99
97.PHONY: FORCE 100PHONY += FORCE
98 101
99FORCE: 102FORCE:
100 103
@@ -109,3 +112,9 @@ cmd_files := $(wildcard $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd))
109ifneq ($(cmd_files),) 112ifneq ($(cmd_files),)
110 include $(cmd_files) 113 include $(cmd_files)
111endif 114endif
115
116
117# Declare the contents of the .PHONY variable as phony. We keep that
118# information in a variable se we can use it in if_changed and friends.
119
120.PHONY: $(PHONY)