Skip to content

Commit

Permalink
kbuild: Create output directory in Makefile.modbuiltin
Browse files Browse the repository at this point in the history
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Michal Marek <mmarek@suse.cz>
  • Loading branch information
michal42 committed Jun 10, 2010
1 parent 2da30e7 commit 607b30f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/Makefile.modbuiltin
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 607b30f

Please sign in to comment.