Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1374100 > unrolled thread

[PATCH] scripts: Fallback to KBUILD_OUTPUT if O is not specified

Started byThierry Reding <thierry.reding@gmail.com>
First post2016-04-08 11:20 +0200
Last post2016-04-08 17:50 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] scripts: Fallback to KBUILD_OUTPUT if O is not specified Thierry Reding <thierry.reding@gmail.com> - 2016-04-08 11:20 +0200
    Re: [PATCH] scripts: Fallback to KBUILD_OUTPUT if O is not specified Arnaldo Carvalho de Melo <acme@redhat.com> - 2016-04-08 17:00 +0200
      Re: [PATCH] scripts: Fallback to KBUILD_OUTPUT if O is not specified "Wangnan (F)" <wangnan0@huawei.com> - 2016-04-08 17:40 +0200
        Re: [PATCH] scripts: Fallback to KBUILD_OUTPUT if O is not specified Arnaldo Carvalho de Melo <acme@redhat.com> - 2016-04-08 17:50 +0200

#1374100 — [PATCH] scripts: Fallback to KBUILD_OUTPUT if O is not specified

FromThierry Reding <thierry.reding@gmail.com>
Date2016-04-08 11:20 +0200
Subject[PATCH] scripts: Fallback to KBUILD_OUTPUT if O is not specified
Message-ID<rlAK6-1xG-23@gated-at.bofh.it>
From: Thierry Reding <treding@nvidia.com>

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.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
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(+)

diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include
index 8abbef164b4e..5467da41dc72 100644
--- a/tools/scripts/Makefile.include
+++ b/tools/scripts/Makefile.include
@@ -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
-- 
2.8.0

[toc] | [next] | [standalone]


#1374270

FromArnaldo Carvalho de Melo <acme@redhat.com>
Date2016-04-08 17:00 +0200
Message-ID<rlG39-5o2-39@gated-at.bofh.it>
In reply to#1374100
Em Fri, Apr 08, 2016 at 11:14:09AM +0200, Thierry Reding escreveu:
> From: Thierry Reding <treding@nvidia.com>
> 
> 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.

I think this is fine, Jiri, Wang?

- Arnaldo
 
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
> 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(+)
> 
> diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include
> index 8abbef164b4e..5467da41dc72 100644
> --- a/tools/scripts/Makefile.include
> +++ b/tools/scripts/Makefile.include
> @@ -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
> -- 
> 2.8.0

[toc] | [prev] | [next] | [standalone]


#1374318

From"Wangnan (F)" <wangnan0@huawei.com>
Date2016-04-08 17:40 +0200
Message-ID<rlGFR-60n-31@gated-at.bofh.it>
In reply to#1374270

On 2016/4/8 22:58, Arnaldo Carvalho de Melo wrote:
> Em Fri, Apr 08, 2016 at 11:14:09AM +0200, Thierry Reding escreveu:
>> From: Thierry Reding <treding@nvidia.com>
>>
>> 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.
> 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.

> - Arnaldo
>   
>> Signed-off-by: Thierry Reding <treding@nvidia.com>
>> ---
>> 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(+)
>>
>> diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include
>> index 8abbef164b4e..5467da41dc72 100644
>> --- a/tools/scripts/Makefile.include
>> +++ b/tools/scripts/Makefile.include
>> @@ -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
>> -- 
>> 2.8.0

[toc] | [prev] | [next] | [standalone]


#1374321

FromArnaldo Carvalho de Melo <acme@redhat.com>
Date2016-04-08 17:50 +0200
Message-ID<rlGPw-649-5@gated-at.bofh.it>
In reply to#1374318
Em Fri, Apr 08, 2016 at 11:37:06PM +0800, Wangnan (F) escreveu:
> 
> 
> On 2016/4/8 22:58, Arnaldo Carvalho de Melo wrote:
> >Em Fri, Apr 08, 2016 at 11:14:09AM +0200, Thierry Reding escreveu:
> >>From: Thierry Reding <treding@nvidia.com>
> >>
> >>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.
> >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?

> 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.
> 
> >- Arnaldo
> >>Signed-off-by: Thierry Reding <treding@nvidia.com>
> >>---
> >>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(+)
> >>
> >>diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include
> >>index 8abbef164b4e..5467da41dc72 100644
> >>--- a/tools/scripts/Makefile.include
> >>+++ b/tools/scripts/Makefile.include
> >>@@ -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
> >>-- 
> >>2.8.0
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web