summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRichard Hacker <lerichi@gmx.net>2008-02-28 09:40:58 +0100
committerSam Ravnborg <sam@uranus.ravnborg.org>2008-04-25 20:45:26 +0200
commit0d96fb20b7ed757fc936bb35e26c22251a75b734 (patch)
tree6a82ad54353d40ddc97dbb600b214a1944f023c2 /scripts
parent2d04b5ae1bf527201a7505c9be7526c43ebd2930 (diff)
downloadlinux-0d96fb20b7ed757fc936bb35e26c22251a75b734.tar.bz2
kbuild: Add new Kbuild variable KBUILD_EXTRA_SYMBOLS
This patch adds a new (Kbuild) Makefile variable KBUILD_EXTRA_SYMBOLS. The space separated list of file names assigned to KBUILD_EXTRA_SYMBOLS is used when calling scripts/mod/modpost during stage 2 of the Kbuild process for non-kernel-tree modules. Signed-off-by: Richard Hacker <lerichi@gmx.net> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.modpost8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index 2d20640854b7..24b3c8fe6bca 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -42,6 +42,13 @@ _modpost: __modpost
include include/config/auto.conf
include scripts/Kbuild.include
+
+ifneq ($(KBUILD_EXTMOD),)
+# Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS
+include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \
+ $(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile)
+endif
+
include scripts/Makefile.lib
kernelsymfile := $(objtree)/Module.symvers
@@ -69,6 +76,7 @@ modpost = scripts/mod/modpost \
$(if $(CONFIG_MODULE_SRCVERSION_ALL),-a,) \
$(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \
$(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \
+ $(if $(iKBUILD_EXTRA_SYMBOLS), $(patsubst %, -e %,$(EXTRA_SYMBOLS))) \
$(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \
$(if $(CONFIG_DEBUG_SECTION_MISMATCH),,-S) \
$(if $(CONFIG_MARKERS),-K $(kernelmarkersfile)) \