Skip to contentSkip to conversation

scripts/package/Makefile: compare objtree with srctree instead of test KBUILD_OUTPUT

PATCH In review Bin Wang 2 participants 3 messages Feb 25, 2013 – Apr 8, 2013 Kbuild

lore
Share & tools
lore

Bin Wang

author
#0 lore raw

PATCH 1/1 scripts/package/Makefile: compare objtree with srctree instead of test KBUILD_OUTPUT

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(-)
scripts/package/Makefile +1 -1
index 87bf080..d7b3285 100644
@@ -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."; \
Signature · 1 line
1.8.1.4
author
#1 lore raw

Hi, Michal

Is there any comments on this?

2013/2/25 Bin Wang <[email protected]>:

Quoted 25 lines

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(-)
scripts/package/Makefile +1 -2
index 87bf080..d7b3285 100644
@@ -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

#2 lore raw
Quoted 3 lines · Bin Wang

Hi, Michal

Is there any comments on this?

Sorry, I missed this one. I applied it to kbuild.git#misc now.

Michal

Quoted 31 lines

2013/2/25 Bin Wang <[email protected]>:

Quoted 23 lines

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(-)
scripts/package/Makefile +1 -2
index 87bf080..d7b3285 100644
@@ -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."; \
--
Quoted 2 lines

1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html