aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-06-02 15:26:02 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-06-02 15:26:02 -0700
commitb09916e4f07de1cb2259cb01ec31e6ce535471bc (patch)
treed4e4ed7b2b0ab7cf6d31121a10565e98ec26ab50
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6 (diff)
parentkbuild: fix $(src) assignmnet with external modules (diff)
downloadlinux-dev-b09916e4f07de1cb2259cb01ec31e6ce535471bc.tar.xz
linux-dev-b09916e4f07de1cb2259cb01ec31e6ce535471bc.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes: kbuild: fix $(src) assignmnet with external modules
-rw-r--r--scripts/Makefile.modpost6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index a098a0454dc8..17092d6c7db3 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -43,7 +43,13 @@ _modpost: __modpost
include include/config/auto.conf
include scripts/Kbuild.include
+# When building external modules load the Kbuild file to retreive EXTRA_SYMBOLS info
ifneq ($(KBUILD_EXTMOD),)
+
+# set src + obj - they may be used when building the .mod.c file
+obj := $(KBUILD_EXTMOD)
+src := $(obj)
+
# Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS
include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \
$(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile)