diff options
author | Michal Marek <mmarek@suse.cz> | 2010-06-10 14:23:08 +0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2010-06-10 14:23:08 +0400 |
commit | 607b30fcf20c6e5339591692db6ffa0b15e041a0 (patch) | |
tree | 291d52ac4f69806f10dcfa817630bb2660a0742c /scripts/Makefile.modbuiltin | |
parent | 2da30e703c5a56e27249fa8b8607708123fa52f5 (diff) | |
download | linux-607b30fcf20c6e5339591692db6ffa0b15e041a0.tar.xz |
kbuild: Create output directory in Makefile.modbuiltin
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/Makefile.modbuiltin')
-rw-r--r-- | scripts/Makefile.modbuiltin | 5 |
1 files changed, 5 insertions, 0 deletions
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) |