From patchwork Thu Mar 28 00:34:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadim Bendebury X-Patchwork-Id: 231863 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id AA7D32C0097 for ; Thu, 28 Mar 2013 12:37:37 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 287184A124; Thu, 28 Mar 2013 02:37:35 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MaHYPpCDckRz; Thu, 28 Mar 2013 02:37:34 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9CF354A11D; Thu, 28 Mar 2013 02:37:33 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 995A24A11D for ; Thu, 28 Mar 2013 02:37:32 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AAk6y6R1pwJP for ; Thu, 28 Mar 2013 02:37:31 +0100 (CET) X-Greylist: delayed 3311 seconds by postgrey-1.27 at theia; Thu, 28 Mar 2013 02:37:30 CET X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-gg0-f202.google.com (mail-gg0-f202.google.com [209.85.161.202]) by theia.denx.de (Postfix) with ESMTPS id 9581A4A11C for ; Thu, 28 Mar 2013 02:37:29 +0100 (CET) Received: by mail-gg0-f202.google.com with SMTP id q1so349737ggn.3 for ; Wed, 27 Mar 2013 18:37:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=QtcpOxv1RlbDCNcZLEACTzEacaMD+WIOpMmibrI5DjA=; b=D9qZTpXeWblcJdjtFb7b8bHXkhQozsR2+ZzBFB+pZmUuExNVIWCDgFogV1NSCI/h5q FNokoB5T3Tj0zbmiN+0KNezH4Iiv2HkZFqh9aTpOUdf3y7hKB1EgKbGJVD0YdIBjYip8 b7YaB96pL/FVnBdw5OeFkMSoMKrFCklCGoeehser3poS3LCHnc09heGlavo1iVNrG01v +PL17/r97MiZNQxmmCDlZMgsvjvNcHuwbrUvZcbIfGvGdz6htwQUrvo9YjHdHDoM7aCQ qHI9JEGWAXQv//MuaoexEflVvaQykPHHNCNNi/N2WUqQtgsvjoRUYjw+kQIUecZxsowX MdOw== X-Received: by 10.224.72.199 with SMTP id n7mr12833843qaj.5.1364430861715; Wed, 27 Mar 2013 17:34:21 -0700 (PDT) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id x1si3931988qci.2.2013.03.27.17.34.21 (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Wed, 27 Mar 2013 17:34:21 -0700 (PDT) Received: from eskimo.mtv.corp.google.com (dhcp-172-22-83-52.mtv.corp.google.com [172.22.83.52]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id 793E731C166; Wed, 27 Mar 2013 17:34:21 -0700 (PDT) Received: by eskimo.mtv.corp.google.com (Postfix, from userid 41370) id 1A5D7220888; Wed, 27 Mar 2013 17:34:20 -0700 (PDT) From: Vadim Bendebury To: trini@ti.com Date: Wed, 27 Mar 2013 17:34:18 -0700 Message-Id: <1364430858-22175-1-git-send-email-vbendeb@chromium.org> X-Mailer: git-send-email 1.8.1.3 X-Gm-Message-State: ALoCoQlgsFkQx8E94Dd3WhcZCS/f48AuTRo40P9kqDi35XQp+QAB5xHgNmc6R1hqny+hyub6kwRGANRw3yLlPtxzdpnUPu0RZU7HEIXr7jqxQ7VnCKuLS3tedP43foVSPiPB/9hGLSMqkt0AT8gbRMoM3HvkZw/2GSw346XPZLuHvO7rCAevA+bBJwxVrj65tTa5gLUEiCZf Cc: u-boot@lists.denx.de, Vadim Bendebury Subject: [U-Boot] [PATCH] build: Fix make errors generated when building 'distclean' X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de It was noticed that when `make distclean' is run, the make process terminates with error reporting something like: rm: cannot remove '/tmp/foobar/': Is a directory make: *** [clobber] Error 1 The problem is that the list of files targeted for removal includes a directory in case CONFIG_SPL_TARGET is not set. The fix has been tested as follows: Ran several times the following sequence of commands: CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- make O=/tmp/foobar smdk5250_config CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- make O=/tmp/foobar distclean it did not cause an error, it used to before this change. Signed-off-by: Vadim Bendebury Acked-by: Simon Glass --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 12763ce..23f266a 100644 --- a/Makefile +++ b/Makefile @@ -406,8 +406,10 @@ ALL-y += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map ALL-$(CONFIG_NAND_U_BOOT) += $(obj)u-boot-nand.bin ALL-$(CONFIG_ONENAND_U_BOOT) += $(obj)u-boot-onenand.bin ALL-$(CONFIG_SPL) += $(obj)spl/u-boot-spl.bin -ALL-$(CONFIG_SPL) += $(obj)$(subst ",,$(CONFIG_SPL_TARGET)) ALL-$(CONFIG_OF_SEPARATE) += $(obj)u-boot.dtb $(obj)u-boot-dtb.bin +ifneq ($(CONFIG_SPL_TARGET),) +ALL-$(CONFIG_SPL) += $(obj)$(subst ",,$(CONFIG_SPL_TARGET)) +endif # enable combined SPL/u-boot/dtb rules for tegra ifneq ($(CONFIG_TEGRA),)