Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3478652pxb; Sat, 26 Mar 2022 20:55:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbgtEycSjdBnDnFg4mqviqKFQWOtFzxoc7INQgqRhJYHnrS1BoUGLONHYO+ijLC7WiO+q1 X-Received: by 2002:aa7:df99:0:b0:419:2823:4c23 with SMTP id b25-20020aa7df99000000b0041928234c23mr8259106edy.341.1648353341256; Sat, 26 Mar 2022 20:55:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648353341; cv=none; d=google.com; s=arc-20160816; b=RtVkbxfbRYOL3dngFB8eQjPXidgwAxs0ER9GG6kQ6MP+o8F50fZb17+RSMhwAc6Gfc aPb2sBB64IpV6cHW74+s1I14TEISCSxR0s5XRO/losqNBEDxRj1+RRUk2DgrTRydwSD2 0SmNhut9iYFGg8sivmUhMw3SfPZfCyn2WcmYI9cxUNAAxto8d/fIgidHjd5Lw2AXXgvM UJo5fyyKBls9KDTM4gfB7K0q/Aad0mKaMU5kQAeL84YOUDwQj7AkDnoHOHNYGaHN0B8m 0upz8c7D4CbtwEs6gu5Ny+ijzhoB4pbU9UCW/gztWUqdJzuyH4stz7K0uRqYbdxG5usS fJ/g== 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=jglTiu+RgOcbw4fjRNLQwHEL+OIOsX2J1DNsqsTPUgM=; b=VmEJzn5aHxwIWUDjYMGB0RMpSep/4kbBquKn1FI6T4T4az+4lwneqLHyDUfc2ie9Wl xOdSKSbTqB/wk+sS2I/Fbjn43Qza3uSNsbH6xXvBoCsaWEj4UIT3NaoDAZc4sop9oQwH 3klczee1sReA32Z2NRgaLFeEG3yYS2Ci9G/QLZwzbDL4dZd6HCPR7rEcVEOWqSrcxcYj EkTWpulw/LdYNbwH+eXagCo8rrfdeKIQ3SlOTUGI4VRIBpTUfcrdm8KndYOI5jJswRl4 IuzEZbBM7IwS2evY5g08aUNFCGbC14ucCBsWwkstko6xJMgfM1AJR/2UEWaQacEKJRxJ U7Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dyyW0Q4+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y13-20020a50eb8d000000b00418f03382cesi9125544edr.283.2022.03.26.20.55.16; Sat, 26 Mar 2022 20:55:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dyyW0Q4+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232591AbiCZK3Y (ORCPT + 99 others); Sat, 26 Mar 2022 06:29:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232527AbiCZK3F (ORCPT ); Sat, 26 Mar 2022 06:29:05 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DA9B4F44E; Sat, 26 Mar 2022 03:27:29 -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 C26DA60B8A; Sat, 26 Mar 2022 10:27:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 85EAFC34100; Sat, 26 Mar 2022 10:27:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648290447; bh=+MIt+athm81UOKvOGZ5ZQcQ4L0fnD6TdonEeO/0FhQM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dyyW0Q4+ZIt8W1n0J5Zg9uDJEsXLhDtBkhqVtrloMm5rBoY0azcmyRQRRH4xjmkYy hxdjaxIixFqpIsSl45hZDImEXpz6BaqyRh63ZHMEI167tqUZ5AnMQ6I6fQ23MaatD5 5JOjnZ8E1Nb7B8g3ucNapkZdbVOnEwb0dLqGLNeN8QvpZc6cxn6uPDSQBZG1DW6LJZ KYe0MZ2Sd6zbDRCJijvrGQtWG+6uWKEXy89V8cPhddONGxTz6ShcARMe+VOr+t6YQJ 7H4g54vPWEgJoZ+MAHdOYTsEZvrcbz/3B90oCmOK/IneGJDGASKxniIoW6wY5uBON/ rbsFtq38YWz0A== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1nY3dl-00Co0Y-3N; Sat, 26 Mar 2022 11:27:25 +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 v3 2/6] docs: kernel_feat.py: add build dependencies Date: Sat, 26 Mar 2022 11:27:20 +0100 Message-Id: <5cdf7a8300019129dcc09d4c2557f75908754445.1648290305.git.mchehab@kernel.org> 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=-7.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 v3 0/6] at: https://lore.kernel.org/all/cover.1648290305.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..27b701ed3681 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("^\.\. 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