From patchwork Wed Jan 18 05:05:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13105570 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E852BC32793 for ; Wed, 18 Jan 2023 05:06:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229489AbjARFGT (ORCPT ); Wed, 18 Jan 2023 00:06:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229681AbjARFFs (ORCPT ); Wed, 18 Jan 2023 00:05:48 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4633158282; Tue, 17 Jan 2023 21:05:47 -0800 (PST) From: Thomas =?utf-8?q?Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=weissschuh.net; s=mail; t=1674018345; bh=aYunoo5x5odK4usSUbnIpWDFANhMjpbIUG7PfzbCVpI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=axcgvCv9lTgT9hwQsrr6GlKYsEAEoQtmRf2jjpq9Uy3ZfbUUbaHUa6se2OYyx7vhX X7iJ5dyg/eNAZQYyOY/eJbSBnYCvC5Ut+8Oj8RNd2FeO5sBj06wJ/IlOQUaBtcTfLu EiPOa8WRaT64zgENcKLXRuca4arIlEetc+XLBubM= Date: Wed, 18 Jan 2023 05:05:34 +0000 Subject: [PATCH v3 1/2] kbuild: also delete temporary directories MIME-Version: 1.0 Message-Id: <20230117-kernel-kheaders-gitignore-v3-1-e686b93b0732@weissschuh.net> References: <20230117-kernel-kheaders-gitignore-v3-0-e686b93b0732@weissschuh.net> In-Reply-To: <20230117-kernel-kheaders-gitignore-v3-0-e686b93b0732@weissschuh.net> To: Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Nicolas Schier Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Nicolas Schier , Thomas =?utf-8?q?Wei=C3=9Fschuh?= X-Mailer: b4 0.11.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1674018337; l=959; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=aYunoo5x5odK4usSUbnIpWDFANhMjpbIUG7PfzbCVpI=; b=c/5gcfjMh2EedFCrZGqbxj5rOTR4Gm/6xCPkbZnboA91XQQYQeHZIZ1TQVQmsUUBxM2mql4uVtlH 9vzFgFBHCkOrKz+un1FUM9bb43nyfUPFL/juefWDYNScI2W65F6N X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org Reuse the standard naming schema for temporary files also for temporary directories. Such a directory will be used by the kheaders generation. Signed-off-by: Thomas Weißschuh Reviewed-by: Nicolas Schier Tested-by: Nicolas Schier --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e09fe100efb2..863b3fdd4374 100644 --- a/Makefile +++ b/Makefile @@ -2026,11 +2026,12 @@ clean: $(clean-dirs) -o -name '*.lex.c' -o -name '*.tab.[ch]' \ -o -name '*.asn1.[ch]' \ -o -name '*.symtypes' -o -name 'modules.order' \ - -o -name '.tmp_*' \ -o -name '*.c.[012]*.*' \ -o -name '*.ll' \ -o -name '*.gcno' \ - -o -name '*.*.symversions' \) -type f -print | xargs rm -f + -o -name '*.*.symversions' \) -type f -print \ + -o -name '.tmp_*' -print \ + | xargs rm -rf # Generate tags for editors # --------------------------------------------------------------------------- From patchwork Wed Jan 18 05:05:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13105568 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00421C32793 for ; Wed, 18 Jan 2023 05:06:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229666AbjARFGP (ORCPT ); Wed, 18 Jan 2023 00:06:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229551AbjARFFs (ORCPT ); Wed, 18 Jan 2023 00:05:48 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11BB2577FD; Tue, 17 Jan 2023 21:05:47 -0800 (PST) From: Thomas =?utf-8?q?Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=weissschuh.net; s=mail; t=1674018345; bh=/0jOebbYX70I0nvSrPoQPRoP/uFq1ZW6GdE24q/IDq8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=kddahOoPrJno2N+e1J9xr+ojBUF2ea3a/gpcjfUHwa9NCRwY/sXhCGS/rU7xQg8rN iJolY6cOTft6+1iOCunOfhL4GBbY5/L/9T1AKHsay42WxejIYYzc4ik5kYZYduMHJq +7x4+7RMdVE4Z+oYhpSTqVIEbBq0pQ9Etn1M5X44= Date: Wed, 18 Jan 2023 05:05:35 +0000 Subject: [PATCH v3 2/2] kheaders: use standard naming for the temporary directory MIME-Version: 1.0 Message-Id: <20230117-kernel-kheaders-gitignore-v3-2-e686b93b0732@weissschuh.net> References: <20230117-kernel-kheaders-gitignore-v3-0-e686b93b0732@weissschuh.net> In-Reply-To: <20230117-kernel-kheaders-gitignore-v3-0-e686b93b0732@weissschuh.net> To: Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Nicolas Schier Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Nicolas Schier , Thomas =?utf-8?q?Wei=C3=9Fschuh?= X-Mailer: b4 0.11.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1674018337; l=867; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=/0jOebbYX70I0nvSrPoQPRoP/uFq1ZW6GdE24q/IDq8=; b=fyFTMXVPgKM/lMPfOB9cHpXWfMqiZN06jA4troAsamgUfy30G4vk7DualK2n5M/OIxgmuWg1HZ2P Z6kuzlTjDwkgBvFviSdoJG4mapmJb5jftKhu0YBnx3o0a/K8vto7 X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org If the kheaders archive generation is interrupted then this directory may be left on disk and not ignored by git. By using the standard naming schema for temporary files and directories the default .gitignore and "make clean" rules will apply. Suggested-by: Nicolas Schier Suggested-by: Masahiro Yamada Signed-off-by: Thomas Weißschuh Reviewed-by: Nicolas Schier Tested-by: Nicolas Schier --- kernel/gen_kheaders.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/gen_kheaders.sh b/kernel/gen_kheaders.sh index 473036b43c83..b477b763f262 100755 --- a/kernel/gen_kheaders.sh +++ b/kernel/gen_kheaders.sh @@ -7,7 +7,7 @@ set -e sfile="$(readlink -f "$0")" outdir="$(pwd)" tarfile=$1 -cpio_dir=$outdir/$tarfile.tmp +cpio_dir=$outdir/${tarfile%/*}/.tmp_cpio_dir dir_list=" include/