Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758025AbcDHJOP (ORCPT ); Fri, 8 Apr 2016 05:14:15 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:35278 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757142AbcDHJOM (ORCPT ); Fri, 8 Apr 2016 05:14:12 -0400 From: Thierry Reding To: Arnaldo Carvalho de Melo Cc: linux-kernel@vger.kernel.org Subject: [PATCH] scripts: Fallback to KBUILD_OUTPUT if O is not specified Date: Fri, 8 Apr 2016 11:14:09 +0200 Message-Id: <1460106849-6435-1-git-send-email-thierry.reding@gmail.com> X-Mailer: git-send-email 2.8.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1199 Lines: 41 From: Thierry Reding The KBUILD_OUTPUT environment can be used to set the build directory as an alternative to passing the O variable on the command-line. This works with regular kernel builds, so it's surprising if it doesn't work within the tools/scripts directory. Allow KBUILD_OUTPUT if O is not specified on the command-line to avoid any surprises. Signed-off-by: Thierry Reding --- Hi Arnaldo, I'm not sure if you're the right person to send this to. There was noone reported by scripts/get_maintainer.pl, but it looks like you ended up applying most of the patches to this file lately, which kinda makes you the de facto maintainer =). Thierry tools/scripts/Makefile.include | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include index 8abbef164b4e..5467da41dc72 100644 --- a/tools/scripts/Makefile.include +++ b/tools/scripts/Makefile.include @@ -8,6 +8,10 @@ ifeq ($(objtree),) objtree := $(O) endif endif +else +ifneq ($(KBUILD_OUTPUT),) + OUTPUT := $(KBUILD_OUTPUT)/$(if $(subdir),$(subdir)/) +endif endif # check that the output directory actually exists -- 2.8.0