Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2146625pxb; Fri, 25 Mar 2022 11:55:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjd3cncWe1wVALcjfjFZhK0FElpKY/Ob8BCMT2+vcriaRfALelYAGa7NR1KH1CKTDcGBn6 X-Received: by 2002:a63:b51:0:b0:381:6a51:9481 with SMTP id a17-20020a630b51000000b003816a519481mr766895pgl.582.1648234550103; Fri, 25 Mar 2022 11:55:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648234550; cv=none; d=google.com; s=arc-20160816; b=WnCikY29pOua4+1f2/FjHaXdXxNWYD7lBWQBPcj/sGr8+kYmRwfYeVkpn/llfefQ7S euDSTpViH/LWu6EokVdjq9rFYIDJlTuR3TRUBtINeLz9swqv7tNVdiFdj637SowHnXwO q7uNjEGX/Zojmh+wUqErjg/SdcdFIimVXNwAf1EcmThbKuQ2I6mjPH+nsadFM5a6TIAM J4ZH2shmm83fEVaT/UEzb+Lf59uf1wgUeuTKZKhVqquwpgKRMqHTygl9oN56cJJ98mBo k5QqCeW7l7EfW97sA/qDZvXgM9SrnxXr3CmIQA1qjrF1gJAtrGmnHGx8LJAk6EvQJGMD vs4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DmIc9xRQrE7Zis/7air14hwalwgiSB7JwQvvgVVnRi8=; b=XCpjSdNZOPukTHkYZCnbYqvSSsja2A4553rASvDsQ2S6NJssxCfuhRZ/jxE4DlAlML SQVI3j2GPkJPJX4NGOCU+49e2ZKm38AXIEZt33lm0gI0SN+QXbcirOp674oeOnJmH8qq lIRHiQ+10K9dHmxVRgr/VrSab1Bondaz1knPelLGgG22l32pw+7wAbtgCgfaNqjAYIhZ 3hlNR9L20m/XgU17MO4UGw/qK6oVlIQOjgy/D9FIwFwAr0uKOu+3IudzwNWm3DUmOpyy hY1T8O/YUHd63U++1/RTveT259Y3yainvt6mETSeKmAM0M2Dmokuw95irvXvvl0JdC+z CZPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VrsvSUsJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id nn5-20020a17090b38c500b001c72b71a7e4si6580916pjb.27.2022.03.25.11.55.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 11:55:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VrsvSUsJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EA6731DC9A5; Fri, 25 Mar 2022 11:09:05 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353883AbiCYOHB (ORCPT + 99 others); Fri, 25 Mar 2022 10:07:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359264AbiCYOGx (ORCPT ); Fri, 25 Mar 2022 10:06:53 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53AC4D8F4B; Fri, 25 Mar 2022 07:05:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E551D61AFB; Fri, 25 Mar 2022 14:05:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4396AC340F5; Fri, 25 Mar 2022 14:05:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648217118; bh=WUbC8iv4z1FG3/dSJ3crKi1kvQQgoCPRCCQlmTdH6fM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VrsvSUsJfXJ8qBH/DFssjDNCvUv3ZrJdlq+jA6yYU4rWDt89hoIdFF4g8HB2vBZHa eyBPxVIirW6iquG4DcAOQfqwY3v6Z8GviMCJy6ZHPtMFx/cASuarYLBZxjNuOgef5m +FTXX3EGNh5/hmPxg9SgM6MaamOiw4d0t2n5LzGzSmSqJQPB6SkYbGzhrfecPSohux iP+32gh8wEyWzEiBxlzkGi8yZlVuMM6GCV0oFJqedt7VEP159hVAoYZ5wJ0YEBZk0r ezG3jjX4ylfFONrr3NKS6dtm4W+6JohqdgcpNm+/2Ub7rDpzoxNKobI8hyeZbWnsTN 346I1xwlWUzEg== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1nXkZ1-00Axz1-Rb; Fri, 25 Mar 2022 15:05:15 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Jonathan Corbet Cc: Mauro Carvalho Chehab , "Hans de Goede" , "Stephen Rothwell" , Randy Dunlap , linux-kernel@vger.kernel.org Subject: [PATCH v2 3/4] docs: kernel_feat.py: add build dependencies Date: Fri, 25 Mar 2022 15:05:13 +0100 Message-Id: X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ensure that the feature files will be regenerated if any changes happen at the Documentation/features files that were processed by gen_feat.pl. Signed-off-by: Mauro Carvalho Chehab --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH v2 0/4] at: https://lore.kernel.org/all/cover.1648216561.git.mchehab@kernel.org/ Documentation/sphinx/kernel_feat.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Documentation/sphinx/kernel_feat.py b/Documentation/sphinx/kernel_feat.py index 8138d69a6987..6b40ac1806bb 100644 --- a/Documentation/sphinx/kernel_feat.py +++ b/Documentation/sphinx/kernel_feat.py @@ -33,6 +33,7 @@ u""" import codecs import os +import re import subprocess import sys @@ -82,7 +83,7 @@ class KernelFeat(Directive): env = doc.settings.env cwd = path.dirname(doc.current_source) - cmd = "get_feat.pl rest --dir " + cmd = "get_feat.pl rest --enable-fname --dir " cmd += self.arguments[0] if len(self.arguments) > 1: @@ -102,7 +103,22 @@ class KernelFeat(Directive): shell_env["srctree"] = srctree lines = self.runCmd(cmd, shell=True, cwd=cwd, env=shell_env) - nodeList = self.nestedParse(lines, fname) + + line_regex = re.compile("^#define FILE (\S+)$") + + out_lines = "" + + for line in lines.split("\n"): + match = line_regex.search(line) + if match: + fname = match.group(1) + + # Add the file to Sphinx build dependencies + env.note_dependency(os.path.abspath(fname)) + else: + out_lines += line + "\n" + + nodeList = self.nestedParse(out_lines, fname) return nodeList def runCmd(self, cmd, **kwargs): -- 2.35.1