diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-06-11 12:55:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-06-11 12:55:50 -0400 |
commit | 891a9894ee2e17646b29117635d2c7adfb58ce60 (patch) | |
tree | 17acf50ef98da55306167e36bdf2d7f26c686a4c | |
parent | f1f6ea352257e0df33cf0184ba777c293cb6f1d6 (diff) | |
parent | 607b30fcf20c6e5339591692db6ffa0b15e041a0 (diff) |
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-- | Makefile | 4 | ||||
-rw-r--r-- | scripts/Makefile.modbuiltin | 5 |
2 files changed, 7 insertions, 2 deletions
@@ -1095,7 +1095,7 @@ all: modules | |||
1095 | # using awk while concatenating to the final file. | 1095 | # using awk while concatenating to the final file. |
1096 | 1096 | ||
1097 | PHONY += modules | 1097 | PHONY += modules |
1098 | modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) | 1098 | modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin |
1099 | $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order | 1099 | $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order |
1100 | @$(kecho) ' Building modules, stage 2.'; | 1100 | @$(kecho) ' Building modules, stage 2.'; |
1101 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost | 1101 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost |
@@ -1117,7 +1117,7 @@ PHONY += modules_install | |||
1117 | modules_install: _modinst_ _modinst_post | 1117 | modules_install: _modinst_ _modinst_post |
1118 | 1118 | ||
1119 | PHONY += _modinst_ | 1119 | PHONY += _modinst_ |
1120 | _modinst_: modules.builtin | 1120 | _modinst_: |
1121 | @if [ -z "`$(DEPMOD) -V 2>/dev/null | grep module-init-tools`" ]; then \ | 1121 | @if [ -z "`$(DEPMOD) -V 2>/dev/null | grep module-init-tools`" ]; then \ |
1122 | echo "Warning: you may need to install module-init-tools"; \ | 1122 | echo "Warning: you may need to install module-init-tools"; \ |
1123 | echo "See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt";\ | 1123 | 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: | |||
14 | 14 | ||
15 | include scripts/Kbuild.include | 15 | include scripts/Kbuild.include |
16 | 16 | ||
17 | ifneq ($(KBUILD_SRC),) | ||
18 | # Create output directory if not already present | ||
19 | _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj)) | ||
20 | endif | ||
21 | |||
17 | # The filename Kbuild has precedence over Makefile | 22 | # The filename Kbuild has precedence over Makefile |
18 | kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src)) | 23 | kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src)) |
19 | kbuild-file := $(if $(wildcard $(kbuild-dir)/Kbuild),$(kbuild-dir)/Kbuild,$(kbuild-dir)/Makefile) | 24 | kbuild-file := $(if $(wildcard $(kbuild-dir)/Kbuild),$(kbuild-dir)/Kbuild,$(kbuild-dir)/Makefile) |