scripts: Fallback to KBUILD_OUTPUT if O is not specified
PATCH 1/1 scripts: Fallback to KBUILD_OUTPUT if O is not specified
From: Thierry Reding <[email protected]>
The KBUILD_OUTPUT environment can be used to set the build directory as an alternative to passing the O variable on the command-line. This works with regular kernel builds, so it's surprising if it doesn't work within the tools/scripts directory.
Allow KBUILD_OUTPUT if O is not specified on the command-line to avoid any surprises.
---
Hi Arnaldo,
I'm not sure if you're the right person to send this to. There was noone reported by scripts/get_maintainer.pl, but it looks like you ended up applying most of the patches to this file lately, which kinda makes you the de facto maintainer =).
Thierry
tools/scripts/Makefile.include | 4 ++++ 1 file changed, 4 insertions(+)
tools/scripts/Makefile.include +4 -0
@@ -8,6 +8,10 @@ ifeq ($(objtree),) objtree := $(O) endif endif +else +ifneq ($(KBUILD_OUTPUT),) + OUTPUT := $(KBUILD_OUTPUT)/$(if $(subdir),$(subdir)/) +endif endif # check that the output directory actually exists
Signature · 1 line
2.8.0
Em Fri, Apr 08, 2016 at 11:14:09AM +0200, Thierry Reding escreveu:
Quoted 9 lines
From: Thierry Reding <[email protected]>
The
KBUILD_OUTPUTenvironment can be used to set the build directory as an alternative to passing the O variable on the command-line. This works with regular kernel builds, so it's surprising if it doesn't work within thetools/scriptsdirectory.Allow
KBUILD_OUTPUTif O is not specified on the command-line to avoid any surprises.
I think this is fine, Jiri, Wang?
- Arnaldo
Quoted 31 lines
Signed-off-by Thierry Reding <[email protected]>---
Hi Arnaldo,I'm not sure if you're the right person to send this to. There was noone reported by
scripts/get_maintainer.pl, but it looks like you ended up applying most of the patches to this file lately, which kinda makes you the de facto maintainer =).Thierry
tools/scripts/Makefile.include | 4 ++++ 1 file changed, 4 insertions(+)tools/scripts/Makefile.include +4
-0@@ -8,6 +8,10 @@ ifeq ($(objtree),) objtree := $(O) endif endif +else +ifneq ($(KBUILD_OUTPUT),) + OUTPUT := $(KBUILD_OUTPUT)/$(if $(subdir),$(subdir)/) +endif endif # check that the output directory actually existsSignature · 1 line
2.8.0
Quoted 11 lines · Arnaldo Carvalho de Melo
Em Fri, Apr 08, 2016 at 11:14:09AM +0200, Thierry Reding escreveu:
Quoted 9 lines
From: Thierry Reding <[email protected]>
The
KBUILD_OUTPUTenvironment can be used to set the build directory as an alternative to passing the O variable on the command-line. This works with regular kernel builds, so it's surprising if it doesn't work within thetools/scriptsdirectory.Allow
KBUILD_OUTPUTif O is not specified on the command-line to avoid any surprises.I think this is fine, Jiri, Wang?
The idea is fine, but we should be very careful when touching Makefile to avoid breaking build-test like this:
# export KBUILD_OUTPUT=/tmp/xxxxx # ./tests/perf-targz-src-pkg . PERF_VERSION = 4.5.g337b7b ls: cannot access perf-*.tar.gz: No such file or directory tar: -C: Cannot open: No such file or directory tar: Error is not recoverable: exiting now make: *** /tmp/tmp.q4egWrFd3L/perf*/tools/perf: No such file or directory. Stop
Moreover, in the above case, the output directory should be
/tmp/xxxxx
or
/tmp/xxxxx/tools/perf ?
Since kernel build output things to /tmp/xxxxx, I think we'd better output to /tmp/xxxxx/tools/perf.
Thank you.
Quoted 33 lines
- Arnaldo
Quoted 31 lines
Signed-off-by Thierry Reding <[email protected]>---
Hi Arnaldo,I'm not sure if you're the right person to send this to. There was noone reported by
scripts/get_maintainer.pl, but it looks like you ended up applying most of the patches to this file lately, which kinda makes you the de facto maintainer =).Thierry
tools/scripts/Makefile.include | 4 ++++ 1 file changed, 4 insertions(+)tools/scripts/Makefile.include +4
-0@@ -8,6 +8,10 @@ ifeq ($(objtree),) objtree := $(O) endif endif +else +ifneq ($(KBUILD_OUTPUT),) + OUTPUT := $(KBUILD_OUTPUT)/$(if $(subdir),$(subdir)/) +endif endif # check that the output directory actually existsSignature · 1 line
2.8.0
Em Fri, Apr 08, 2016 at 11:37:06PM +0800, Wangnan (F) escreveu:
Quoted 11 lines · Arnaldo Carvalho de Melo
Quoted 8 lines
Em Fri, Apr 08, 2016 at 11:14:09AM +0200, Thierry Reding escreveu:
Quoted 7 lines
From: Thierry Reding <[email protected]>
The
KBUILD_OUTPUTenvironment can be used to set the build directory as an alternative to passing the O variable on the command-line. This works with regular kernel builds, so it's surprising if it doesn't work within thetools/scriptsdirectory.
Quoted 5 lines
Quoted 3 lines
Quoted 2 lines
Allow
KBUILD_OUTPUTif O is not specified on the command-line to avoid any surprises.I think this is fine, Jiri, Wang?
The idea is fine, but we should be very careful when touching
Makefile
Yeah, I haven't tested it, Thierry, would you try the 'make -C tools/perf build-test' with this set up?
Quoted 56 lines
to avoid breaking build-test like this:
# export KBUILD_OUTPUT=/tmp/xxxxx # ./tests/perf-targz-src-pkg . PERF_VERSION = 4.5.g337b7b ls: cannot access perf-*.tar.gz: No such file or directory tar: -C: Cannot open: No such file or directory tar: Error is not recoverable: exiting now make: *** /tmp/tmp.q4egWrFd3L/perf*/tools/perf: No such file or directory. StopMoreover, in the above case, the output directory should be
/tmp/xxxxxor
/tmp/xxxxx/tools/perf?Since kernel build output things to
/tmp/xxxxx, I think we'd better output to/tmp/xxxxx/tools/perf.Thank you.
Quoted 31 lines
- Arnaldo
Quoted 30 lines
Signed-off-by Thierry Reding <[email protected]>---
Hi Arnaldo,I'm not sure if you're the right person to send this to. There was noone reported by
scripts/get_maintainer.pl, but it looks like you ended up applying most of the patches to this file lately, which kinda makes you the de facto maintainer =).Thierry
tools/scripts/Makefile.include | 4 ++++ 1 file changed, 4 insertions(+)tools/scripts/Makefile.include +4
-0@@ -8,6 +8,10 @@ ifeq ($(objtree),) objtree := $(O) endif endif +else +ifneq ($(KBUILD_OUTPUT),) + OUTPUT := $(KBUILD_OUTPUT)/$(if $(subdir),$(subdir)/) +endif endif # check that the output directory actually existsSignature · 1 line
2.8.0