Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

kbuild: Create output directory in Makefile.modbuiltin

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Michal Marek <mmarek@suse.cz>
  • Loading branch information...
commit 607b30fcf20c6e5339591692db6ffa0b15e041a0 1 parent 2da30e7
@michal42 michal42 authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 scripts/Makefile.modbuiltin
View
5 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)
Please sign in to comment.
Something went wrong with that request. Please try again.