summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-06-11 18:55:50 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2010-06-11 18:55:50 +0200
commit891a9894ee2e17646b29117635d2c7adfb58ce60 (patch)
tree17acf50ef98da55306167e36bdf2d7f26c686a4c
parentMerge branch 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/... (diff)
parentkbuild: Create output directory in Makefile.modbuiltin (diff)
downloadlinux-891a9894ee2e17646b29117635d2c7adfb58ce60.tar.xz
linux-891a9894ee2e17646b29117635d2c7adfb58ce60.zip
Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: kbuild: Create output directory in Makefile.modbuiltin kbuild: Generate modules.builtin in make modules
-rw-r--r--Makefile4
-rw-r--r--scripts/Makefile.modbuiltin5
2 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 654c31aaec64..993d1f335925 100644
--- a/Makefile
+++ b/Makefile
@@ -1095,7 +1095,7 @@ all: modules
# using awk while concatenating to the final file.
PHONY += modules
-modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux)
+modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
$(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
@$(kecho) ' Building modules, stage 2.';
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
@@ -1117,7 +1117,7 @@ PHONY += modules_install
modules_install: _modinst_ _modinst_post
PHONY += _modinst_
-_modinst_: modules.builtin
+_modinst_:
@if [ -z "`$(DEPMOD) -V 2>/dev/null | grep module-init-tools`" ]; then \
echo "Warning: you may need to install module-init-tools"; \
echo "See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt";\
diff --git a/scripts/Makefile.modbuiltin b/scripts/Makefile.modbuiltin
index 102a276f6eea..1adb974e6950 100644
--- a/scripts/Makefile.modbuiltin
+++ b/scripts/Makefile.modbuiltin
@@ -14,6 +14,11 @@ __modbuiltin:
include scripts/Kbuild.include
+ifneq ($(KBUILD_SRC),)
+# Create output directory if not already present
+_dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj))
+endif
+
# The filename Kbuild has precedence over Makefile
kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
kbuild-file := $(if $(wildcard $(kbuild-dir)/Kbuild),$(kbuild-dir)/Kbuild,$(kbuild-dir)/Makefile)