From patchwork Fri Jun 6 01:31:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 4309531 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 874E39F505 for ; Fri, 6 Jun 2014 01:31:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B6631201E4 for ; Fri, 6 Jun 2014 01:31:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E3595201F7 for ; Fri, 6 Jun 2014 01:31:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751419AbaFFBbP (ORCPT ); Thu, 5 Jun 2014 21:31:15 -0400 Received: from smtp.mei.co.jp ([133.183.100.20]:44096 "EHLO smtp.mei.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751912AbaFFBbM (ORCPT ); Thu, 5 Jun 2014 21:31:12 -0400 Received: from mail-gw.jp.panasonic.com ([157.8.1.157]) by smtp.mei.co.jp (8.12.11.20060614/3.7W/kc-maile11) with ESMTP id s561VA3Z026801 for ; Fri, 6 Jun 2014 10:31:10 +0900 (JST) Received: from epochmail.jp.panasonic.com ([157.8.1.130]) by mail.jp.panasonic.com (8.11.6p2/3.7W/kc-maili16) with ESMTP id s561VAM32546 for ; Fri, 6 Jun 2014 10:31:10 +0900 Received: by epochmail.jp.panasonic.com (8.12.11.20060308/3.7W/lomi15) id s561VA7t016503; Fri, 6 Jun 2014 10:31:10 +0900 Received: from poodle by lomi15.jp.panasonic.com (8.12.11.20060308/3.7W) with ESMTP id s561VAZd016484; Fri, 6 Jun 2014 10:31:10 +0900 Received: from beagle.diag.org (beagle.diag.org [10.184.179.16]) by poodle (Postfix) with ESMTP id 6BE662743A5F; Fri, 6 Jun 2014 10:31:10 +0900 (JST) From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada Subject: [PATCH 4/5] kbuild: clean-up and bug fix of scripts/Makefile.host Date: Fri, 6 Jun 2014 10:31:02 +0900 Message-Id: <1402018263-30670-5-git-send-email-yamada.m@jp.panasonic.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1402018263-30670-1-git-send-email-yamada.m@jp.panasonic.com> References: <1402018263-30670-1-git-send-email-yamada.m@jp.panasonic.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Assume we have a Makefile like this: hostprogs-y := foo foo-cxxobjs := bar/baz.o foo-objs := qux/quux.o In this case, Kbuild creates bar/ directory, but fails to create qux/ directory. This commit re-writes directory creation more simply, fixing that bug. Signed-off-by: Masahiro Yamada --- scripts/Makefile.host | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/scripts/Makefile.host b/scripts/Makefile.host index e6abc2e..b0e1a64 100644 --- a/scripts/Makefile.host +++ b/scripts/Makefile.host @@ -64,13 +64,9 @@ host-cshobjs := $(sort $(foreach m,$(host-cshlib),$($(m:.so=-objs)))) # output directory for programs/.o files # hostprogs-y := tools/build may have been specified. Retrieve directory host-objdirs := $(foreach f,$(__hostprogs), $(dir $(f))) -# directory of .o files from prog-objs notation -host-objdirs += $(foreach f,$(host-cmulti), \ - $(foreach m,$($(f)-objs), \ - $(dir $(m)))) -# directory of .o files from prog-cxxobjs notation -host-objdirs += $(foreach f,$(host-cxxmulti), \ - $(foreach m,$($(f)-cxxobjs), \ +# directory of .o files from prog-objs or prog-cxxobjs notation +host-objdirs += $(foreach f,$(__hostprogs), \ + $(foreach m,$($(f)-objs) $($(f)-cxxobjs), \ $(dir $(m)))) host-objdirs := $(strip $(sort $(filter-out ./,$(host-objdirs))))