public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scripts/package/Makefile: compare objtree with srctree instead of test KBUILD_OUTPUT
@ 2013-02-25  3:02 Bin Wang
  0 siblings, 0 replies; only message in thread
From: Bin Wang @ 2013-02-25  3:02 UTC (permalink / raw)
  To: mmarek, linux-kbuild, linux-kernel; +Cc: Bin Wang

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.
---
 scripts/package/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/package/Makefile b/scripts/package/Makefile
index 87bf080..d7b3285 100644
--- a/scripts/package/Makefile
+++ b/scripts/package/Makefile
@@ -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."; \
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-02-25  3:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-25  3:02 [PATCH] scripts/package/Makefile: compare objtree with srctree instead of test KBUILD_OUTPUT Bin Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox