All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kbuild: let make O=dir rpm-pkg fail
@ 2009-11-04  6:14 Akinobu Mita
  2009-11-04 21:06 ` Frans Pop
  0 siblings, 1 reply; 3+ messages in thread
From: Akinobu Mita @ 2009-11-04  6:14 UTC (permalink / raw)
  To: linux-kernel; +Cc: Akinobu Mita, Sam Ravnborg, Frans Pop

make rpm-pkg with setting KBUILD_OUTPUT is not possible and
it will print the good message since the commit
db9038c89d129383a9db2afcb72b504fe54f6edf

$ KBUILD_OUTPUT=dir make rpm-pkg
...
Building source + binary RPM is not possible outside the
kernel source tree. Don't set KBUILD_OUTPUT, or use the
binrpm-pkg target instead.
...

make O=dir should have the same effect of KBUILD_OUTPUT, but
it won't print that message.

This fixes it by exporting KBUILD_OUTPUT if O= is set so that
the rpm-pkg target in scripts/package/Makefile can find it.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Frans Pop <elendil@planet.nl>
---
 Makefile                 |    2 +-
 scripts/package/Makefile |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index b4c04f7..cfee468 100644
--- a/Makefile
+++ b/Makefile
@@ -93,7 +93,7 @@ ifeq ($(KBUILD_SRC),)
 # OK, Make called in directory where kernel src resides
 # Do we want to locate output files in a separate directory?
 ifeq ("$(origin O)", "command line")
-  KBUILD_OUTPUT := $(O)
+  export KBUILD_OUTPUT := $(O)
 endif
 
 # That's our default target when none is given on the command line
diff --git a/scripts/package/Makefile b/scripts/package/Makefile
index f67cc88..5db03d7 100644
--- a/scripts/package/Makefile
+++ b/scripts/package/Makefile
@@ -19,7 +19,7 @@
 # - Use /. to avoid tar packing just the symlink
 
 # Note that the rpm-pkg target cannot be used with KBUILD_OUTPUT,
-# but the binrpm-pkg target can; for some reason O= gets ignored.
+# but the binrpm-pkg target can.
 
 # Do we have rpmbuild, otherwise fall back to the older rpm
 RPM := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \
-- 
1.6.5.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] kbuild: let make O=dir rpm-pkg fail
  2009-11-04  6:14 [PATCH] kbuild: let make O=dir rpm-pkg fail Akinobu Mita
@ 2009-11-04 21:06 ` Frans Pop
  2009-11-05  6:43   ` Akinobu Mita
  0 siblings, 1 reply; 3+ messages in thread
From: Frans Pop @ 2009-11-04 21:06 UTC (permalink / raw)
  To: Akinobu Mita; +Cc: linux-kernel, Sam Ravnborg

On Wednesday 04 November 2009, Akinobu Mita wrote:
> make rpm-pkg with setting KBUILD_OUTPUT is not possible and
> it will print the good message since the commit
> db9038c89d129383a9db2afcb72b504fe54f6edf
>
> $ KBUILD_OUTPUT=dir make rpm-pkg
> ...
> Building source + binary RPM is not possible outside the
> kernel source tree. Don't set KBUILD_OUTPUT, or use the
> binrpm-pkg target instead.
> ...
>
> make O=dir should have the same effect of KBUILD_OUTPUT, but
> it won't print that message.
>
> This fixes it by exporting KBUILD_OUTPUT if O= is set so that
> the rpm-pkg target in scripts/package/Makefile can find it.

Looks good to me. I suspect this will also fix the open question that I had 
when I submitted the patch you refer to:
<quote>
One open issue is that the following commands should IIUC be identical,
but the second one does not work:
- KBUILD_OUTPUT=../builds/amd64 make -j4 binrpm-pkg
- make -j4 O=../builds/amd64 binrpm-pkg

AFAICT the root Makefile is supposed to set KBUILD_OUTPUT based on O=, but
that is not visible when the lines within the binrpm-pkg target are 
executed.
My make foo was not strong enough to debug this.
</quote>

I also suspect that the use of O= is currently equally broken for the 
deb-pkg target (I know setting KBUILD_OUTPUT does work) and that this 
patch will fix that as well.

Cheers,
FJP

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kbuild: let make O=dir rpm-pkg fail
  2009-11-04 21:06 ` Frans Pop
@ 2009-11-05  6:43   ` Akinobu Mita
  0 siblings, 0 replies; 3+ messages in thread
From: Akinobu Mita @ 2009-11-05  6:43 UTC (permalink / raw)
  To: Frans Pop; +Cc: linux-kernel, Sam Ravnborg

2009/11/5 Frans Pop <elendil@planet.nl>:
> On Wednesday 04 November 2009, Akinobu Mita wrote:
>> make rpm-pkg with setting KBUILD_OUTPUT is not possible and
>> it will print the good message since the commit
>> db9038c89d129383a9db2afcb72b504fe54f6edf
>>
>> $ KBUILD_OUTPUT=dir make rpm-pkg
>> ...
>> Building source + binary RPM is not possible outside the
>> kernel source tree. Don't set KBUILD_OUTPUT, or use the
>> binrpm-pkg target instead.
>> ...
>>
>> make O=dir should have the same effect of KBUILD_OUTPUT, but
>> it won't print that message.
>>
>> This fixes it by exporting KBUILD_OUTPUT if O= is set so that
>> the rpm-pkg target in scripts/package/Makefile can find it.
>
> Looks good to me. I suspect this will also fix the open question that I had
> when I submitted the patch you refer to:
> <quote>
> One open issue is that the following commands should IIUC be identical,
> but the second one does not work:
> - KBUILD_OUTPUT=../builds/amd64 make -j4 binrpm-pkg
> - make -j4 O=../builds/amd64 binrpm-pkg
>
> AFAICT the root Makefile is supposed to set KBUILD_OUTPUT based on O=, but
> that is not visible when the lines within the binrpm-pkg target are
> executed.
> My make foo was not strong enough to debug this.
> </quote>

make binrpm-pkg with O= works without this patch on my system
(CentOS5 i386). So I did not mention about it in the patch description.

> I also suspect that the use of O= is currently equally broken for the
> deb-pkg target (I know setting KBUILD_OUTPUT does work) and that this
> patch will fix that as well.

I don't have debian based system and I can't test deb-pkg now.
But I hope it works, too.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-11-05  6:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-04  6:14 [PATCH] kbuild: let make O=dir rpm-pkg fail Akinobu Mita
2009-11-04 21:06 ` Frans Pop
2009-11-05  6:43   ` Akinobu Mita

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.