From patchwork Wed May 29 06:10:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zzs0213@gmail.com X-Patchwork-Id: 2627891 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 6D22240077 for ; Wed, 29 May 2013 06:12:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754363Ab3E2GMX (ORCPT ); Wed, 29 May 2013 02:12:23 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:33767 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752930Ab3E2GMX (ORCPT ); Wed, 29 May 2013 02:12:23 -0400 Received: by mail-pa0-f50.google.com with SMTP id fb11so7519316pad.37 for ; Tue, 28 May 2013 23:12:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:x-mailer:mime-version:content-type :content-transfer-encoding; bh=/mmCDHffby3QmpjZleSRH5sg206u2r01jEuxoFOwyPE=; b=LuzWaMf1JAADc5rN2XhyvYdl5jRp0AI11/+1lKQBD7cNkPn5LERdhVypOfpLQFtj/l 4ojNRGr3Xf/gyVIRfLtJ6RM0DudC14f1JkfoWyGsuWFNU9ibWlkQTP3BZ3xLOOz6O/b6 6LgPo2QlQWUuWa2GUQG3TpVNQrG1DaxskmvnzmhECfeTpLFYGK0Xmq5tACuMKrzMKdR8 AuaRRPHRJv9L8mr3WwpgOa2Z4vgleAfQjELHPiKIFXm5uxdUnnfy6q57ReXMklKL5s3B qycqdorpHWVwHStdE/gqLUY+ccRX8ZzkinIpFG5x1iZh1VTtXQkPEOL9CJ5mh9NyVBdg lOAw== X-Received: by 10.68.245.70 with SMTP id xm6mr1374786pbc.76.1369807942913; Tue, 28 May 2013 23:12:22 -0700 (PDT) Received: from localhost.localdomain ([110.184.249.21]) by mx.google.com with ESMTPSA id cd2sm35971964pbd.35.2013.05.28.23.12.17 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 28 May 2013 23:12:21 -0700 (PDT) From: =?UTF-8?q?=E5=BC=A0=E5=BF=A0=E5=B1=B1?= To: linux-kbuild@vger.kernel.org Subject: [PATCH] let kbuild mkdir for dir/file.o Date: Wed, 29 May 2013 14:10:48 +0800 Message-Id: <1369807848-4465-1-git-send-email-zzs0213@gmail.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org when add a obj with dir to obj-y, like this obj-y += dir/file.o the $(obj)/dir not created, this patch fix this this bug caused by commit f5fb976520a53f45f8bbf2e851f16b3b5558d485 Signed-off-by: ??? --- scripts/Makefile.lib | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 51bb3de..6bae5a9 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -63,7 +63,8 @@ multi-objs := $(multi-objs-y) $(multi-objs-m) subdir-obj-y := $(filter %/built-in.o, $(obj-y)) # $(obj-dirs) is a list of directories that contain object files -obj-dirs := $(dir $(multi-objs) $(subdir-obj-y)) +__subdir-obj-y := $(foreach o,$(obj-y),$(if $(filter-out $(o),$(notdir $(o))),$(o))) +obj-dirs := $(dir $(multi-objs) $(__subdir-obj-y)) # Replace multi-part objects by their individual parts, look at local dir only real-objs-y := $(foreach m, $(filter-out $(subdir-obj-y), $(obj-y)), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m))) $(extra-y)