From patchwork Sun Feb 11 08:40:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 127905 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp2175064ljc; Sun, 11 Feb 2018 00:41:43 -0800 (PST) X-Google-Smtp-Source: AH8x224c7ambpEcLm/BUp8jic512SIvIHRdEvvAZn5PpWYbIxIRBBj8KdIKbYzs9VFjKNSIvF103 X-Received: by 10.99.117.83 with SMTP id f19mr4974963pgn.318.1518338503142; Sun, 11 Feb 2018 00:41:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518338503; cv=none; d=google.com; s=arc-20160816; b=NpF7aE+Z2xtRg0Ktwi6vP/aChnFtIPdIFtQy947lKQLENoY32yvcu3azGsM4htBLjz J2p2BZwvpWbIamDFMxoqQG8TD3A00xsk9yMcVfmQjZdoQWPiv/+3Lj6rOYQi5z7rcV2o nw5i33TYgOzR7N7TOr3tkOL3sPZWI3ahYtSRjRWkivOAAoPJ/uGcrNjeBZd+OZ/GSQjx w1xt4/FSrKthFsoU/Z/xifIAr34tUTSwdf29Py0kSdoLwZrPBurd8JnTj/6QqZMNyE86 MfVNITwd4N1CJHJMh203sq9xQiVrmOzo1vrkYwXTEOLkQbOwueDZOHu+CZR9ER8EebR+ uPeg== 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:arc-authentication-results; bh=LLy39PomvIZdrJQXb/6lasLpQKMAd9ttvP5THcKoW5s=; b=GXev933Crc4Is6045Cig28lcAeMSPYRtotTaq8pvusoyGtzdH8rKMkXPKSSg2O9Hjg tkHUxZJ9b74/RFhysQOguQx80Emvo6vxxyjr4/Iu4Rui0FlMegLluI1tC8lFrOd3LoA/ +fj2Tl1sX6W0IpxOoODaT/WH4UrybF0JjUlRHf6DHxMwCDS4NooOdEL+7V3V6i1dJzei 0wiECTq3ll2fC4dHuHjMJc77ArVDg2i0urJqKIp2uSVb+8A8ckL/48hl/3dcRN/H/KcS hmWAn0Op9tTr/AgNnfy626wbVo7mqYbEdMlT14xRFJr8ZUeppR9TXxquiMDBZe4ymPcQ iTdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Baw4e2bC; 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 g8si2063047pgq.446.2018.02.11.00.41.42; Sun, 11 Feb 2018 00:41:43 -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=Baw4e2bC; 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 S1752688AbeBKIlk (ORCPT + 18 others); Sun, 11 Feb 2018 03:41:40 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:47569 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752038AbeBKIli (ORCPT ); Sun, 11 Feb 2018 03:41:38 -0500 Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-11.nifty.com with ESMTP id w1B8eaDK014695; Sun, 11 Feb 2018 17:40:36 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com w1B8eaDK014695 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1518338437; bh=LLy39PomvIZdrJQXb/6lasLpQKMAd9ttvP5THcKoW5s=; h=From:To:Cc:Subject:Date:From; b=Baw4e2bCG1zv3Ldq2R4UflHrsBejlfJ6wIv+ao86VYEo5Kk8955IaQHxaZVoPipJf fwDXsAsdtF4XyTPv46/qoNmhDl5lOwPLreNa/0V2I9lI9v8i0wceU2IJ81j9VEaAi5 ccLxzwYqo4btHMe7+aUpZMOZ+oEc7IM9i9HFoLQsSK6587FZ9aXzsOi0eGiJqay6rr luyBvWgqluGX/DpmxRM4iOd9kfiNofL29175udTMxqjttrmuKgyOxxry++kXpHZgNI +DH8U8MkB3YNo1qyEo44ygMfOwGMjmMVt8FFFsSdqngNE3EK0UUJJ13LZx/1mp6In9 O8OsA+NVtbs+g== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , Michal Marek , Thomas Meyer , Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH] kbuild: process mixture of clean/build targets one by one Date: Sun, 11 Feb 2018 17:40:29 +0900 Message-Id: <1518338429-5587-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 I sometimes receive a question why "make -j clean all" does not work. It is actually possible to make it work by handling targets one by one. Signed-off-by: Masahiro Yamada --- Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/Makefile b/Makefile index cd9145c..31d138e 100644 --- a/Makefile +++ b/Makefile @@ -220,7 +220,8 @@ export srctree objtree VPATH version_h := include/generated/uapi/linux/version.h old_version_h := include/linux/version.h -no-dot-config-targets := clean mrproper distclean \ +clean-targets := %clean mrproper cleandocs +no-dot-config-targets := $(clean-targets) \ cscope gtags TAGS tags help% %docs check% coccicheck \ $(version_h) headers_% archheaders archscripts \ kernelversion %src-pkg @@ -243,6 +244,14 @@ ifeq ($(KBUILD_EXTMOD),) endif endif endif + +# For "make -j clean all", "make -j mrproper defconfig all", etc. +ifneq ($(filter $(clean-targets),$(MAKECMDGOALS)),) + ifneq ($(filter-out $(clean-targets),$(MAKECMDGOALS)),) + mixed-targets := 1 + endif +endif + # install and modules_install need also be processed one by one ifneq ($(filter install,$(MAKECMDGOALS)),) ifneq ($(filter modules_install,$(MAKECMDGOALS)),)