From patchwork Fri Jan 18 14:33:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sunil Beta Baskar X-Patchwork-Id: 2003031 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 2E63EDF280 for ; Fri, 18 Jan 2013 14:33:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751238Ab3AROd6 (ORCPT ); Fri, 18 Jan 2013 09:33:58 -0500 Received: from mail-pa0-f49.google.com ([209.85.220.49]:42630 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751187Ab3AROd6 (ORCPT ); Fri, 18 Jan 2013 09:33:58 -0500 Received: by mail-pa0-f49.google.com with SMTP id bi1so2141570pad.22 for ; Fri, 18 Jan 2013 06:33:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:from:date:message-id:subject:to :content-type; bh=Q50vAKv4YG5w7Sb879H77ZHxnn6GUoLMft25OF1iVlY=; b=OF3meOT4UOH97VX4DSEOHjx+8jBTuENH8xiMcxY36LUJJyDwNtpv41oNSIoepiYuTI xYlluU2O2Uua+x4sHbbVvoUZOoxxqxnTdNm6rldobvaqgVRtMw1WZ+0Lij6VlfVs2D0+ Tnt79X3zJV5WeopXncrq4CbUAxcvtKKVn7Ef1/9b0SIiSIpUrqsgV3l0lAWv2/IvYbA9 zypuLl2SBpRKrwm9Kt5jJjGnMLwB218ZcoqismixaSa15AxCr4bN6UomL24B0+diG/Ti uZTY93FpP8kJneldAFn1QwIAW2u1GrKNFHuOdeeLyk3XV3J8IBGYYDejujB+2hhKMO9S F+bA== X-Received: by 10.68.228.34 with SMTP id sf2mr24890617pbc.85.1358519637595; Fri, 18 Jan 2013 06:33:57 -0800 (PST) MIME-Version: 1.0 Received: by 10.66.49.105 with HTTP; Fri, 18 Jan 2013 06:33:42 -0800 (PST) From: Sunil Beta Baskar Date: Fri, 18 Jan 2013 20:03:42 +0530 Message-ID: Subject: [PATCH] fix: build aborts if SPACE characters are found in path. To: Michal Marek , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org Signed-off-by: Sunil Beta --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) -- 1.7.10.4 ----- This resolves issues with multiple spaces in the source or target path of the kernel. Fixing this completely would require changes to mkmakefile among several other files. This is just to leave newbies comfortable with an error message as to the reason the build failed. Sunil Beta Baskar -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Makefile b/Makefile index 07bc925..48bfd8e 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,8 @@ NAME = "Divemaster Edition" # Comments in this file are targeted only to the developer, do not # expect to learn how to build the kernel reading this file. +CURDIRSPC := $(echo $(CURDIR) | sed "s/ /\\\ /g" ) +$(ifneq $(CURDIR),$(CURDIRSPC), $(error directory $(CURDIR) contains spaces.)) # Do not: # o use make's built-in rules and variables # (this increases performance and avoids hard-to-debug behaviour); @@ -118,6 +120,8 @@ ifneq ($(KBUILD_OUTPUT),) # check that the output directory actually exists saved-output := $(KBUILD_OUTPUT) KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd) +KBUILD_OUTPUT_SPC := $(shell echo $(KBUILD_OUTPUT) | sed "s/ /\\\ /g") +$(ifneq $(KBUILD_OUTPUT),$(KBUILD_OUTPUT_SPC), $(error output directory $(KBUILD_OUTPUT) contains spaces.)) $(if $(KBUILD_OUTPUT),, \ $(error output directory "$(saved-output)" does not exist))