From patchwork Sat Dec 1 00:27:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 152615 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp4292560ljp; Fri, 30 Nov 2018 16:29:14 -0800 (PST) X-Google-Smtp-Source: AFSGD/W03oba72EOjAMjJIflfU8E/VJWiBCJLVBhtcM7GA2N1MLB3vbaShFxLnSoBQvONJ8osw5o X-Received: by 2002:a17:902:5ac7:: with SMTP id g7mr7747476plm.212.1543624154246; Fri, 30 Nov 2018 16:29:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543624154; cv=none; d=google.com; s=arc-20160816; b=FAOUfBN4n95zkNmUgM7NfR89QMQauKru3kA5Dla1yEqNyDh4Sqazbci16T1hKudNha iymU1RIEh93QQkmIWmMhd/tPwnT1oQfRICFY/G9Oc1/zmoehSC30IsL1jD2Gtcid6mtr JLBlGgxJsPHcC/5MWGPHnezzR7c5mWdkeVV12uzXY1BVONhAGCNldfIatN0uxXBSGijI wmAdYAGvmOJA2EPkBpi1FkN9T37eooVGOv/OwPP+DimjDlOARe8U3IG63g+lvKTGR5yY D3j2FXoSOV202qHi3KAjgXALRbWW7wOSy7UmZMJnyvP8VV7glSYWKC2mhrQhjcw5WOnG pq0Q== 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=HRZCOfVhmMCh+LM9JPpkzG1F8H/g9338tefVQ7sAm+U=; b=mYUyxkwxfIrQaISNRUEN4GAyVUQJWUBuGuhZYgSJhqTUXPce0mszA1ckFiXmiCyFvn 1BXB9BGuh2D7qDPYZOwHt/18a5iHn5zIZxIADb4eVEb32cLJ0quCSzhCfFRs/MJuHh34 VqfS1ulEqbxxQkbNrqErPZRym1xTDxzF+MRDLqUgUToYRcf7K3jYYdCNwSSN7tfExCrR 8NlwY5XON4vvbXAYZKWZ+pbhRgCePqM3ZMQKrDtFi+OROVZ10uXPZCMH4BPiiWFVlWoj 7HZz5kKBt/IqSIcgs0yN+E0p2N1QCaj18pxCgwzuBa0nFPl/YNWoldm4nhQihxlKeTkn K03g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Wy7u0n8x; 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 t19si6713872pgk.163.2018.11.30.16.29.13; Fri, 30 Nov 2018 16:29:14 -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=Wy7u0n8x; 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 S1726571AbeLALkT (ORCPT + 32 others); Sat, 1 Dec 2018 06:40:19 -0500 Received: from conuserg-08.nifty.com ([210.131.2.75]:18160 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725867AbeLALkT (ORCPT ); Sat, 1 Dec 2018 06:40:19 -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 wB10RbUH028422; Sat, 1 Dec 2018 09:27:37 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com wB10RbUH028422 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1543624058; bh=HRZCOfVhmMCh+LM9JPpkzG1F8H/g9338tefVQ7sAm+U=; h=From:To:Cc:Subject:Date:From; b=Wy7u0n8xdeJaTVrAA4/BBGWwoDe1omx7m+aWF/Sp4DKlaq8mqSAT/VCHkeQwSfG4z UpnKiYHaLWxrufTChqBngIDdI2a62xfr/DGM1UQPLHsmcb1BOiXGDc3YioOoGzYqJb ELyDJZJ7B6Gh8BC3BJe3GNcEU9CiFswlndUU/U2OUKUd59NtVoXyi/AnZxhILXhWVe tqfUn/yOJ55vFUnYFmIsYfk/ZlluccV/k3E/hD1dsVLputURQeBbG04tx9Rv4eQLgo p0QB/dToB/j7uOARF3V5yUOncYlc334eS4TNosHxdcZFugO1hHl948Ty9+jHEw6/qL jI2K9Yw6O+/Yg== X-Nifty-SrcIP: [218.220.227.105] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: "Jason A . Donenfeld" , Masahiro Yamada , "David S. Miller" , linux-kernel@vger.kernel.org, Michal Marek , linux-crypto@vger.kernel.org, Will Deacon , Herbert Xu , Catalin Marinas , Russell King , linux-arm-kernel@lists.infradead.org Subject: [PATCH] kbuild: move .SECONDARY special target to Kbuild.include Date: Sat, 1 Dec 2018 09:27:15 +0900 Message-Id: <1543624035-4479-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 In commit 54a702f70589 ("kbuild: mark $(targets) as .SECONDARY and remove .PRECIOUS markers"), I missed one important feature of the .SECONDARY target: .SECONDARY with no prerequisites causes all targets to be treated as secondary. Kbuild's policy is, "Do not delete any intermediate files." So, just move it to scripts/Kbuild.include, with no prerequisites. Note: If an intermediate file is generated by $(call if_changed,...), you still need to add it to "targets" so its .*.cmd file is included. The arm/arm64 crypto files are generated by $(call cmd,shipped), so they do not need to be added to "targets", but need to be added to "clean-files" so "make clean" can properly clean them away. Signed-off-by: Masahiro Yamada --- arch/arm/crypto/Makefile | 2 +- arch/arm64/crypto/Makefile | 2 +- scripts/Kbuild.include | 3 +++ scripts/Makefile.build | 4 ---- 4 files changed, 5 insertions(+), 6 deletions(-) -- 2.7.4 diff --git a/arch/arm/crypto/Makefile b/arch/arm/crypto/Makefile index bd5bcee..89f88ab 100644 --- a/arch/arm/crypto/Makefile +++ b/arch/arm/crypto/Makefile @@ -65,4 +65,4 @@ $(src)/sha512-core.S_shipped: $(src)/sha512-armv4.pl $(call cmd,perl) endif -targets += sha256-core.S sha512-core.S +clean-files += sha256-core.S sha512-core.S diff --git a/arch/arm64/crypto/Makefile b/arch/arm64/crypto/Makefile index f476fed..860d931 100644 --- a/arch/arm64/crypto/Makefile +++ b/arch/arm64/crypto/Makefile @@ -75,4 +75,4 @@ $(src)/sha512-core.S_shipped: $(src)/sha512-armv8.pl $(call cmd,perlasm) endif -targets += sha256-core.S sha512-core.S +clean-files += sha256-core.S sha512-core.S diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index bb01555..0454916 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -393,3 +393,6 @@ endef # delete partially updated (i.e. corrupted) files on error .DELETE_ON_ERROR: + +# do not delete intermediate files automatically +.SECONDARY: diff --git a/scripts/Makefile.build b/scripts/Makefile.build index a8e7ba9..604096a 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -546,8 +546,4 @@ $(shell mkdir -p $(obj-dirs)) endif endif -# Some files contained in $(targets) are intermediate artifacts. -# We never want them to be removed automatically. -.SECONDARY: $(targets) - .PHONY: $(PHONY)