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: 10707463 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 48583109C for ; Sat, 1 Dec 2018 00:33:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B80F30134 for ; Sat, 1 Dec 2018 00:33:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2F7E230145; Sat, 1 Dec 2018 00:33:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C684030134 for ; Sat, 1 Dec 2018 00:33:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726424AbeLALob (ORCPT ); Sat, 1 Dec 2018 06:44:31 -0500 Received: from condef-08.nifty.com ([202.248.20.73]:37228 "EHLO condef-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726014AbeLALob (ORCPT ); Sat, 1 Dec 2018 06:44:31 -0500 Received: from conuserg-08.nifty.com ([10.126.8.71])by condef-08.nifty.com with ESMTP id wB10SpvC024543 for ; Sat, 1 Dec 2018 09:29:11 +0900 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-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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)