Skip to content
This repository
Browse code

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 1 changed file with 5 additions and 0 deletions. Show diff stats Hide diff stats

  1. +5 0 scripts/Makefile.modbuiltin
5 scripts/Makefile.modbuiltin
@@ -14,6 +14,11 @@ __modbuiltin:
14 14
15 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 22 # The filename Kbuild has precedence over Makefile
18 23 kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
19 24 kbuild-file := $(if $(wildcard $(kbuild-dir)/Kbuild),$(kbuild-dir)/Kbuild,$(kbuild-dir)/Makefile)

0 comments on commit 607b30f

Please sign in to comment.
Something went wrong with that request. Please try again.