Re: [PATCH,resend] kbuild: fix the binrpm-pkg target to work withKBUILD_OUTPUT set

From: Sam Ravnborg
Date: Sun Sep 27 2009 - 04:29:59 EST


On Tue, Aug 25, 2009 at 10:15:39PM +0200, Frans Pop wrote:
> The binrpm-pkg target (binary RPM only) fails when called with
> KBUILD_OUTPUT set. This patch makes it work.
>
> For the rpm-pkg target (source + binary RPM), building with
> KBUILD_OUTPUT set is not possible and also not needed as the
> actual build is done in a temporary directory anyway, so check
> that KBUILD_OUTPUT is not set in that case to avoid later errors.
>
> Signed-off-by: Frans Pop <elendil@xxxxxxxxx>

Applied.

> ---
>
> I ran into this while trying if I could build an RPM kernel package on
> my Debian notebook :-)
>
> The patch has been tested by doing three builds:
> - make -j4 rpm-pkg
> - make -j4 binrpm-pkg
> - KBUILD_OUTPUT=../builds/amd64 make -j4 binrpm-pkg
>
> For all three the contents of the resulting binary RPM package was
> identical
> (and looked correct); the source RPM package from the first build looked
> sane.
>
> A 'KBUILD_OUTPUT=../builds/amd64 make -j4 rpm-pkg' fails as intended.
>
> 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. Sam, do you know?

I did not look into this - there is too much other stuff pending.

Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/