linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@kernel.org>
To: Linux Doc Mailing List <linux-doc@vger.kernel.org>,
	Jonathan Corbet <corbet@lwn.net>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	"Hans de Goede" <hdegoede@redhat.com>,
	"Stephen Rothwell" <sfr@canb.auug.org.au>,
	Randy Dunlap <rdunlap@infradead.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 2/4] docs: kernel_abi.py: add sphinx build dependencies
Date: Fri, 25 Mar 2022 15:05:12 +0100	[thread overview]
Message-ID: <2c53fbfe3c02a47a5eae4beb298a6db0c95be54a.1648216561.git.mchehab@kernel.org> (raw)
In-Reply-To: <cover.1648216561.git.mchehab@kernel.org>

Ensure that Sphinx-build will handle the files parsed by
get_abi.pl as dependencies. This way, if they are touched,
the ABI output will be regenerated.

Reported-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---

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_abi.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/sphinx/kernel_abi.py b/Documentation/sphinx/kernel_abi.py
index 4392b3cb4020..efab9b14a9f5 100644
--- a/Documentation/sphinx/kernel_abi.py
+++ b/Documentation/sphinx/kernel_abi.py
@@ -128,6 +128,7 @@ class KernelCmd(Directive):
         return out
 
     def nestedParse(self, lines, fname):
+        env = self.state.document.settings.env
         content = ViewList()
         node = nodes.section()
 
@@ -154,6 +155,9 @@ class KernelCmd(Directive):
                     self.do_parse(content, node)
                     content = ViewList()
 
+                    # Add the file to Sphinx build dependencies
+                    env.note_dependency(os.path.abspath(f))
+
                 f = new_f
 
                 # sphinx counts lines from 0
-- 
2.35.1


  parent reply	other threads:[~2022-03-25 14:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-25 14:05 [PATCH v2 0/4] Better handle dependencies on Sphinx extensions Mauro Carvalho Chehab
2022-03-25 14:05 ` [PATCH v2 1/4] scripts/get_feat.pl: allow output the parsed file names Mauro Carvalho Chehab
2022-03-25 19:19   ` Jonathan Corbet
2022-03-25 23:21     ` Mauro Carvalho Chehab
2022-03-25 23:30       ` Mauro Carvalho Chehab
2022-03-26  0:02         ` Jonathan Corbet
2022-03-26 10:24           ` Mauro Carvalho Chehab
2022-03-25 14:05 ` Mauro Carvalho Chehab [this message]
2022-03-25 14:05 ` [PATCH v2 3/4] docs: kernel_feat.py: add build dependencies Mauro Carvalho Chehab
2022-03-25 14:05 ` [PATCH v2 4/4] docs: kernel_include.py: add sphinx " Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2c53fbfe3c02a47a5eae4beb298a6db0c95be54a.1648216561.git.mchehab@kernel.org \
    --to=mchehab@kernel.org \
    --cc=corbet@lwn.net \
    --cc=hdegoede@redhat.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).