Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tools/docs: sphinx-build-wrapper: compute sphinxdirs_list earlier

An upcoming patch will require sphinxdirs_list to be available before
the call to check_rust().

Move it up in the function.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tested-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260118-docs-spurious-rust-v1-3-998e14b9ed9e@weissschuh.net>

authored by

Thomas Weißschuh and committed by
Jonathan Corbet
6f9a96cc 2d652135

+13 -13
+13 -13
tools/docs/sphinx-build-wrapper
··· 670 670 if kerneldoc.startswith(self.srctree): 671 671 kerneldoc = os.path.relpath(kerneldoc, self.srctree) 672 672 673 + if not sphinxdirs: 674 + sphinxdirs = os.environ.get("SPHINXDIRS", ".") 675 + 676 + # 677 + # sphinxdirs can be a list or a whitespace-separated string 678 + # 679 + sphinxdirs_list = [] 680 + for sphinxdir in sphinxdirs: 681 + if isinstance(sphinxdir, list): 682 + sphinxdirs_list += sphinxdir 683 + else: 684 + sphinxdirs_list += sphinxdir.split() 685 + 673 686 args = [ "-b", builder, "-c", docs_dir ] 674 687 675 688 if builder == "latex": ··· 695 682 if rustdoc: 696 683 args.extend(["-t", "rustdoc"]) 697 684 698 - if not sphinxdirs: 699 - sphinxdirs = os.environ.get("SPHINXDIRS", ".") 700 - 701 685 # 702 686 # The sphinx-build tool has a bug: internally, it tries to set 703 687 # locale with locale.setlocale(locale.LC_ALL, ''). This causes a ··· 704 694 locale.setlocale(locale.LC_ALL, '') 705 695 except locale.Error: 706 696 self.env["LC_ALL"] = "C" 707 - 708 - # 709 - # sphinxdirs can be a list or a whitespace-separated string 710 - # 711 - sphinxdirs_list = [] 712 - for sphinxdir in sphinxdirs: 713 - if isinstance(sphinxdir, list): 714 - sphinxdirs_list += sphinxdir 715 - else: 716 - sphinxdirs_list += sphinxdir.split() 717 697 718 698 # 719 699 # Step 1: Build each directory in separate.