From: Michal Marek <mmarek@suse.cz>
To: Sam Ravnborg <sam@ravnborg.org>,
Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org
Subject: Re: [PATCH] kbuild: create a build directory automatically for out-of-tree build
Date: Mon, 31 Mar 2014 22:50:54 +0200 [thread overview]
Message-ID: <5339D52E.4040206@suse.cz> (raw)
In-Reply-To: <20140331203615.GA22334@ravnborg.org>
Dne 31.3.2014 22:36, Sam Ravnborg napsal(a):
> On Mon, Mar 31, 2014 at 04:41:36PM +0900, Masahiro Yamada wrote:
>> Kbuild supports saving output files in a separate directory.
>> But the build directory must be created beforehand. For example,
>>
>> $ mkdir -p dir/to/store/output/files
>> $ make O=dir/to/store/output/files defconfig
>>
>> Creating a build directory automatically would be useful.
>>
>> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
>> ---
>> Makefile | 5 +++--
>> 1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/Makefile b/Makefile
>> index 575e1f8..35b5b7e 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -120,9 +120,10 @@ ifneq ($(KBUILD_OUTPUT),)
>> # Invoke a second make in the output directory, passing relevant variables
>> # check that the output directory actually exists
>> saved-output := $(KBUILD_OUTPUT)
>> -KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd)
>> +KBUILD_OUTPUT := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) \
>> + && /bin/pwd)
>> $(if $(KBUILD_OUTPUT),, \
>> - $(error output directory "$(saved-output)" does not exist))
>> + $(error failed to create output directory "$(saved-output)"))
>>
>> PHONY += $(MAKECMDGOALS) sub-make
>
> Hi Masahiro.
>
> In the past I have rejected such patches - but today I fail to recall why.
> I did a very quick test-spin on this and worked nicely.
>
> So you get my:
>
> Acked-by: Sam Ravnborg <sam@ravnborg.org>
Applied to kbuild.git#kbuild, thanks.
Michal
next prev parent reply other threads:[~2014-03-31 20:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-31 7:41 [PATCH] kbuild: create a build directory automatically for out-of-tree build Masahiro Yamada
2014-03-31 20:36 ` Sam Ravnborg
2014-03-31 20:50 ` Michal Marek [this message]
2014-04-01 17:44 ` Randy Dunlap
2014-04-08 15:19 ` Michal Marek
-- strict thread matches above, loose matches on Subject: below --
2014-12-24 4:35 Masahiro Yamada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5339D52E.4040206@suse.cz \
--to=mmarek@suse.cz \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=yamada.m@jp.panasonic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.