Skip to content

Commit bcf0a53

Browse files
mchehabJonathan Corbet
authored andcommitted
docs: kernel_include.py: add sphinx build dependencies
The files included by kernel-include should be added as build dependencies, in order for sphinx-build to rebuild the corresponding docs if any changes at the included file happens. Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> Link: https://lore.kernel.org/r/d30fc4fa422a13b7e1623d690945c46b58a55e79.1648290305.git.mchehab@kernel.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
1 parent b454180 commit bcf0a53

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Documentation/sphinx/kernel_include.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ class KernelInclude(Include):
5959
u"""KernelInclude (``kernel-include``) directive"""
6060

6161
def run(self):
62+
env = self.state.document.settings.env
6263
path = os.path.realpath(
6364
os.path.expandvars(self.arguments[0]))
6465

@@ -70,6 +71,8 @@ def run(self):
7071

7172
self.arguments[0] = path
7273

74+
env.note_dependency(os.path.abspath(path))
75+
7376
#return super(KernelInclude, self).run() # won't work, see HINTs in _run()
7477
return self._run()
7578

0 commit comments

Comments
 (0)