From patchwork Wed Nov 21 23:11:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 151707 Delivered-To: patch@linaro.org Received: by 2002:aa7:da0f:0:0:0:0:0 with SMTP id r15csp46849eds; Wed, 21 Nov 2018 15:12:17 -0800 (PST) X-Google-Smtp-Source: AJdET5eJEOrvNsxaKfw4m/lQv/OC9MCuNxiYL6/54GMBjK+4Qps717UmUo33CkS4875igkujsNPv X-Received: by 2002:a62:5716:: with SMTP id l22mr8247414pfb.16.1542841937809; Wed, 21 Nov 2018 15:12:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542841937; cv=none; d=google.com; s=arc-20160816; b=Z2Edy5pZTAKGbE/QXcZomQSZIxolstwOoXolM+6ViTdw5WEFCGz1892zR8wnMvBIl6 NH6tHyNxCDKW9sgyXAiS5kuyDjoltEpSwikqgtEjleYSQcr60yWtuwh9dW+91YA89BVx Z8l9vCAokL7eIp/6/g+5AF2J+MdeJR8dsfDj9nXEqGU+UNJw9RFmxsURMIjpYfujlb4v oDLF86XHnNyJdwj26ebERgyRZSZp05Ag2gmeyECxiAQfFId+H9nE2Re3EfE8DF9sM6Se uPmfxrj4yAweK4Z1F48gBVWKYXWfmQcfRj+oIFO4JPQYuMWpWA3tRRihBXuSiwVGfpM/ mKSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=XBUtYQBe9waFSMKVW0sRwzkEQUk2Ds/2ej4O+Gh/a9o=; b=fp7b+64vxfmjN/tKWMSYJtTuwRCZGOKMrBTsURu+pRzDBWPMoBx5VkKYdRSd40qQYF /wL7OMh/gjugFofhE7zp/yuOfnRDIiBbRE6xmZQmBVIdj51O2sWqQ7q68gUD0F+x1LWZ Ea64UDdM+mUB3FpJyGrIIJdqN8D9phxAQRTIjTYt3I8FxpwTJ74dbngogS6ExrUNzCKz tWbabe+xhkTDC1Z/5Az6uAWkk7DBJLPZK9k3U9le7E9ZJFs2pZ1l6m0Q8WfjRbI4uwRE X2r9x1HbR9ZjLs3cHHQYE4botjNCwO1N/Yc3utz8APnK+QTstkaYu/qq+oaO1K6UfJJ+ f/4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=hM0kDevd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f4-v6si41620722plo.111.2018.11.21.15.12.17; Wed, 21 Nov 2018 15:12:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=hM0kDevd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390538AbeKVJsj (ORCPT + 32 others); Thu, 22 Nov 2018 04:48:39 -0500 Received: from conuserg-08.nifty.com ([210.131.2.75]:51970 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387912AbeKVJsj (ORCPT ); Thu, 22 Nov 2018 04:48:39 -0500 Received: from grover.tkatk1.zaq.ne.jp (zaqdadce369.zaq.ne.jp [218.220.227.105]) (authenticated) by conuserg-08.nifty.com with ESMTP id wALNBvXN019266; Thu, 22 Nov 2018 08:11:58 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com wALNBvXN019266 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1542841918; bh=XBUtYQBe9waFSMKVW0sRwzkEQUk2Ds/2ej4O+Gh/a9o=; h=From:To:Cc:Subject:Date:From; b=hM0kDevdJXKUr7AgRsapb38PG6606Aacw3LvMg2VgXQNtBOaFxy5iYEKiy8RUHZwj 6yBPxv9do7DRE0CKmuVlS0b0GLODdWSTDwECG6SGKgTGpoNCvp9tiy/Jhw0RkidSYG 3/LPFR4A6BznQ0dSeRgqj3RMqx+RRG5Jaglip1VyhVuWg+XW+OtnaAwnjMqhySGBSg T/yZ4fE7EBCBtWDCMxcDeQDvpFABeQbGexBflpKn9W5dOPcrg+QKpWdHpiFhoHmeqc in3Xm8aIz4re9ktNIfW6tAcIdSQ1P3cwJzD6UAtTlcTYKHlybg7QXQW2pt5cC9YPv0 QrpGBoVgQaRZA== X-Nifty-SrcIP: [218.220.227.105] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 1/2] kbuild: fix single target build for external module Date: Thu, 22 Nov 2018 08:11:54 +0900 Message-Id: <1542841915-19686-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Building a single target in an external module fails due to missing .tmp_versions directory. For example, $ make -C /lib/modules/$(uname -r)/build M=$PWD foo.o will fail in the following way: CC [M] /home/masahiro/foo/foo.o /bin/sh: 1: cannot create /home/masahiro/foo/.tmp_versions/foo.mod: Directory nonexistent This is because $(cmd_crmodverdir) is executed only for /, %/, %.ko single targets for external modules. Create .tmp_versions in the 'prepare' target. Signed-off-by: Masahiro Yamada --- Makefile | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) -- 2.7.4 diff --git a/Makefile b/Makefile index d5da1df..36f3f0e 100644 --- a/Makefile +++ b/Makefile @@ -1554,9 +1554,6 @@ else # KBUILD_EXTMOD # We are always building modules KBUILD_MODULES := 1 -PHONY += crmodverdir -crmodverdir: - $(cmd_crmodverdir) PHONY += $(objtree)/Module.symvers $(objtree)/Module.symvers: @@ -1568,7 +1565,7 @@ $(objtree)/Module.symvers: module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD)) PHONY += $(module-dirs) modules -$(module-dirs): crmodverdir $(objtree)/Module.symvers +$(module-dirs): prepare $(objtree)/Module.symvers $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@) modules: $(module-dirs) @@ -1609,7 +1606,8 @@ help: # Dummies... PHONY += prepare scripts -prepare: ; +prepare: + $(cmd_crmodverdir) scripts: ; endif # KBUILD_EXTMOD @@ -1733,17 +1731,14 @@ endif # Modules /: prepare scripts FORCE - $(cmd_crmodverdir) $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ $(build)=$(build-dir) # Make sure the latest headers are built for Documentation Documentation/ samples/: headers_install %/: prepare scripts FORCE - $(cmd_crmodverdir) $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ $(build)=$(build-dir) %.ko: prepare scripts FORCE - $(cmd_crmodverdir) $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ $(build)=$(build-dir) $(@:.ko=.o) $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost From patchwork Wed Nov 21 23:11:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 151706 Delivered-To: patch@linaro.org Received: by 2002:aa7:da0f:0:0:0:0:0 with SMTP id r15csp46785eds; Wed, 21 Nov 2018 15:12:13 -0800 (PST) X-Google-Smtp-Source: AFSGD/U3a45c36sKToRXPcQof7s6NHk97c3xSr5eHj7C/dPyMYBTzI5uUO3ieSRCnPtcX5zqlqE6 X-Received: by 2002:a17:902:6502:: with SMTP id b2mr8668712plk.44.1542841933480; Wed, 21 Nov 2018 15:12:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542841933; cv=none; d=google.com; s=arc-20160816; b=cCgglpRIm4s5X3Yg1KfUI1F4IK12x5GJiyXRLlxJVQo8bX+rqbaQjfg229917jFekk 9tGiybUvcfkpJtxT+NLmzYHIDerdF6yk4/J0OHC9joCZVuk/ZoSWN4KZH/z9HbzhYYxw egdggrIgwIt/eNzEE+jGQGI9DFotm1sZFFFOcpYrK/Hb5i3J+tgqmRbPNSBiKfvk5wOY v3vu+uurB2W3pGvTnNz5pMXe/UxkjiMPg1uxm5wKW/4puIU07NvKQBiPARZ/eGsI/8Jt 8iEY/5ytHu1m3WTHw6mG/l6uhdOzUK3KrfB3mcoCZoMuboLAPTxqUOv0NpIgF/1gPxmb IHRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=pL6iditA2OWMhJElimNUDbGuTxlF6AP+5xjs5DzNhhQ=; b=MOQgxPnN/3kQk94bzWADBM2DsuM3SegNuLv79h+J+6qtJ56j1S4MFix6UN2luOP9Px 1hz0S0Sa3OqH0iKN22g10RbEcHStI4Dp7Fb6AkZQFJ4f771hReaJoXQmJks5iTe1CVca p/oA2CMLeeJ77EpNjTcdeBJrWrwDiBGtblQiIZ0R6Ih2VTDAZLOe8NjaZ0xxlO3fj4TW 56jpQXwMUHW7mEZmFmIQ+AXriz4EPMKK4akE6Xy5wzaMPHB+i8NqbZRpHv991p4fJ8Tt XBXco2RkzWvyRXzdRo4nwhc+x7dmjFqrFxhhIHjnjOd+EFkJuzUwazpPOvJMLTd2tWGA klJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=EFky02Cc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f4-v6si41620722plo.111.2018.11.21.15.12.12; Wed, 21 Nov 2018 15:12:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=EFky02Cc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390551AbeKVJsk (ORCPT + 32 others); Thu, 22 Nov 2018 04:48:40 -0500 Received: from conuserg-08.nifty.com ([210.131.2.75]:51971 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387918AbeKVJsj (ORCPT ); Thu, 22 Nov 2018 04:48:39 -0500 Received: from grover.tkatk1.zaq.ne.jp (zaqdadce369.zaq.ne.jp [218.220.227.105]) (authenticated) by conuserg-08.nifty.com with ESMTP id wALNBvXO019266; Thu, 22 Nov 2018 08:11:58 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com wALNBvXO019266 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1542841919; bh=pL6iditA2OWMhJElimNUDbGuTxlF6AP+5xjs5DzNhhQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EFky02CclNUzLI1iJcNk2PQXjT/m7uNOwPXidba+7FAOpHTQWcTBiypJo01R5Keas cGNDwJsLHHOU4Fod1A+4LhaXrGTPTjKg4oDaHvUA/CewNmu+r+dTZ3ETe+r4lNbzw4 ZAGGyeHoF0L9c0VTw9WDUmHTT1ePKS8t/o/2qAMUYyOGqmZ5ynZ8BYMDA6Rcwwokt1 l6Oe2Y9I62pIup36BKEIYYg2nZRmxt320mrVMPDSsMgN9boB/lw+ckL94n80fk53R9 8iZW53FiWBk6J6Jb2BaCDm/I/lwRUzjxad7SYqfEk9JU4uCZzBdsAS9RagaZYeS0lI H04R7hP2C/Kfg== X-Nifty-SrcIP: [218.220.227.105] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 2/2] kbuild: remove 'scripts' dummy target for external module build Date: Thu, 22 Nov 2018 08:11:55 +0900 Message-Id: <1542841915-19686-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1542841915-19686-1-git-send-email-yamada.masahiro@socionext.com> References: <1542841915-19686-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make simply skips a missing rule as long as it is marked as PHONY. Remove the dummy target. Signed-off-by: Masahiro Yamada --- Makefile | 2 -- 1 file changed, 2 deletions(-) -- 2.7.4 diff --git a/Makefile b/Makefile index 36f3f0e..269a9bf 100644 --- a/Makefile +++ b/Makefile @@ -1604,11 +1604,9 @@ help: @echo ' clean - remove generated files in module directory only' @echo '' -# Dummies... PHONY += prepare scripts prepare: $(cmd_crmodverdir) -scripts: ; endif # KBUILD_EXTMOD clean: $(clean-dirs)