scripts/package/Makefile: compare objtree with srctree instead of test KBUILD_OUTPUT
authorBin Wang <wbin00@gmail.com>
Mon, 25 Feb 2013 03:05:24 +0000 (11:05 +0800)
committerMichal Marek <mmarek@suse.cz>
Mon, 8 Apr 2013 11:04:17 +0000 (13:04 +0200)
KBUILD_OUTPUT is always empty here, so it is useless to test it. But
while use O=.., objtree and srctree will be different. I compare them
instead.

Signed-off-by: Bin Wang <wbin00@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
scripts/package/Makefile

index 87bf08076b111987a95081d8a55f13e2fb8d534f..d7b328595a7e6b63e0ca2f9c377a41d95a6a0bc6 100644 (file)
@@ -36,7 +36,7 @@ $(objtree)/kernel.spec: $(MKSPEC) $(srctree)/Makefile
        $(CONFIG_SHELL) $(MKSPEC) > $@
 
 rpm-pkg rpm: $(objtree)/kernel.spec FORCE
-       @if test -n "$(KBUILD_OUTPUT)"; then \
+       @if test "$(objtree)" != "$(srctree)"; then \
                echo "Building source + binary RPM is not possible outside the"; \
                echo "kernel source tree. Don't set KBUILD_OUTPUT, or use the"; \
                echo "binrpm-pkg target instead."; \