Skip to contentSkip to conversation

kbuild: create a build directory automatically for out-of-tree build

PATCH In review Masahiro Yamada 3 participants 7 messages Mar 24, 2014 – Apr 15, 2014 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kbuild: create a build directory automatically for out-of-tree build

Prior to Kbuild, the build system created a build directory, when it did not exist, for out-of-tree build.

This feature was dropped when we switched to Kbuild because many of lines in makefiles were copied from Linux Kernel. (In Linux Kernel, we have to create a build directory by ourselves before starting build.)

That feature seems worth reviving for less typing
even if our code and Linux Kernel diverge.

---
 Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Makefile +2 -1
index 538c3bf..0522ba8 100644
@@ -124,7 +124,8 @@ 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))
 
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH 1/1 kbuild: create a build directory automatically for out-of-tree build

+Tom

Quoted 8 lines · Masahiro Yamada

Prior to Kbuild, the build system created a build directory, when it did not exist, for out-of-tree build.

This feature was dropped when we switched to Kbuild because many of lines in makefiles were copied from Linux Kernel. (In Linux Kernel, we have to create a build directory by ourselves before starting build.)

Quoted 6 lines

That feature seems worth reviving for less typing
even if our code and Linux Kernel diverge.

Arguably could be a bug-fix for this release.

#2 lore raw

PATCH 1/1 kbuild: create a build directory automatically for out-of-tree build

Quoted 15 lines · Simon Glass

+Tom

Quoted 11 lines · Masahiro Yamada

Prior to Kbuild, the build system created a build directory, when it did not exist, for out-of-tree build.

This feature was dropped when we switched to Kbuild because many of lines in makefiles were copied from Linux Kernel. (In Linux Kernel, we have to create a build directory by ourselves before starting build.)

That feature seems worth reviving for less typing
even if our code and Linux Kernel diverge.

Quoted 8 lines
Quoted 3 lines

Arguably could be a bug-fix for this release.

Yeah, I like this and will pick it up. The only question is, has this idea already been rejected in the kernel?

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140327/e22f001d/attachment.pgp>
#3 lore raw

PATCH 1/1 kbuild: create a build directory automatically for out-of-tree build

Hi Tom,

Quoted 20 lines · On Thu, 27 Mar 2014 13:20:33 -0400 Tom Rini <[email protected]> wrote:
Quoted 19 lines · Simon Glass

+Tom

Quoted 14 lines · Masahiro Yamada

Prior to Kbuild, the build system created a build directory, when it did not exist, for out-of-tree build.

This feature was dropped when we switched to Kbuild because many of lines in makefiles were copied from Linux Kernel. (In Linux Kernel, we have to create a build directory by ourselves before starting build.)

That feature seems worth reviving for less typing
even if our code and Linux Kernel diverge.

Quoted 8 lines
Quoted 4 lines

Arguably could be a bug-fix for this release.

Yeah, I like this and will pick it up. The only question is, has this idea already been rejected in the kernel?

I have not sent this patch to the kernel community yet. OK. I will.

Best Regards
Masahiro Yamada

#4 lore raw

PATCH 1/1 kbuild: create a build directory automatically for out-of-tree build

Hi,

Quoted 30 lines · Masahiro Yamada

Hi Tom,

Quoted 4 lines · On Thu, 27 Mar 2014 13:20:33 -0400 Tom Rini <[email protected]> wrote:
Quoted 3 lines · Simon Glass

+Tom

On 23 March 2014 22:55, Masahiro Yamada <[email protected]>

Quoted 19 lines · wrote:
Quoted 19 lines
Quoted 9 lines

Prior to Kbuild, the build system created a build directory, when it did not exist, for out-of-tree build.

This feature was dropped when we switched to Kbuild because many of lines in makefiles were copied from Linux Kernel. (In Linux Kernel, we have to create a build directory by ourselves before starting build.)

Quoted 6 lines

That feature seems worth reviving for less typing
even if our code and Linux Kernel diverge.

Quoted 9 lines
Quoted 5 lines
Quoted 1 line

Arguably could be a bug-fix for this release.

Yeah, I like this and will pick it up. The only question is, has this idea already been rejected in the kernel?

I have not sent this patch to the kernel community yet. OK. I will.

My point is that this is a change from the old U-Boot behaviour, so it would be nice to fix it.

Regards,
Simon

Quoted 6 lines

Best Regards
Masahiro Yamada

#5 lore raw

PATCH 1/1 kbuild: create a build directory automatically for out-of-tree build

In reply to Masahiro Yamada

Hi Tom,

Quoted 29 lines · On Fri, 28 Mar 2014 11:37:28 +0900 Masahiro Yamada <[email protected]>…

Hi Tom,

Quoted 23 lines · On Thu, 27 Mar 2014 13:20:33 -0400 Tom Rini <[email protected]> wrote:
Quoted 22 lines · Simon Glass

+Tom

Quoted 8 lines · Masahiro Yamada

Prior to Kbuild, the build system created a build directory, when it did not exist, for out-of-tree build.

This feature was dropped when we switched to Kbuild because many of lines in makefiles were copied from Linux Kernel. (In Linux Kernel, we have to create a build directory by ourselves before starting build.)

Quoted 6 lines

That feature seems worth reviving for less typing
even if our code and Linux Kernel diverge.

Quoted 9 lines
Quoted 5 lines
Quoted 1 line

Arguably could be a bug-fix for this release.

Yeah, I like this and will pick it up. The only question is, has this idea already been rejected in the kernel?

I have not sent this patch to the kernel community yet. OK. I will.

The good news is this feature was merged
in Linux Kernel mainline (commit 1c9e70a55).

Best Regards
Masahiro Yamada

#6 lore raw
In reply to Masahiro Yamada
Quoted 8 lines · Masahiro Yamada

Prior to Kbuild, the build system created a build directory, when it did not exist, for out-of-tree build.

This feature was dropped when we switched to Kbuild because many of lines in makefiles were copied from Linux Kernel. (In Linux Kernel, we have to create a build directory by ourselves before starting build.)

Quoted 7 lines

That feature seems worth reviving for less typing
even if our code and Linux Kernel diverge.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140328/52ab2212/attachment.pgp>