Lines Matching +full:fedora +full:- +full:release
2 # SPDX-License-Identifier: GPL-2.0
7 # Converted from docs Makefile and parallel-wrapper.sh, both under
22 # Linus Torvalds <torvalds@linux-foundation.org>
36 Sphinx build wrapper that handles Kernel-specific business rules:
38 - it gets the Kernel build environment vars;
39 - it determines what's the best parallelism;
40 - it handles SPHINXDIRS
43 below that, it seeks for a new Python version. If found, it re-runs using
96 Handles a sphinx-build target, adding needed arguments to build
136 with open(config, "r", encoding="utf-8") as fp:
152 1) It can be passed via "-j" argument;
153 2) The SPHINXOPTS="-j8" env var may have "-j";
154 3) if called via GNU make, -j specifies the desired number of jobs.
156 4) if none of the above is available, it should default to "-jauto",
162 # by sphinx-build time. Among them, it may contain sphinx verbosity
166 parser.add_argument('-j', '--jobs', type=int)
167 parser.add_argument('-q', '--quiet', action='store_true')
170 # Other sphinx-build arguments go as-is, so place them
185 # If the user explicitly sets "-j" at command line, use it.
196 self.sphinxopts += ["-q"]
215 # Several distros package python3xx-sphinx packages with newer
216 # versions of Python and sphinx-build.
225 self.latexopts = os.environ.get("LATEXOPTS", "-interaction=batchmode -no-shell-escape")
247 self.sphinxbuild = os.environ.get("SPHINXBUILD", "sphinx-build")
249 "scripts/kernel-doc.py"))
281 Executes sphinx-build using current python3 command.
285 jobs, as we don't want sphinx-build to run in parallel with other
314 # We can't simply call python3 sphinx-build, as OpenSUSE
316 # between different versions of sphinx-build. So, only call it
325 cmd += [f"-j{n_jobs}"]
391 # any warning makes it non-zero. For kernel doc builds it always return
392 # non-zero even when build succeeds. So, let's do the best next thing:
406 name = name[:-len(tex_suffix)]
465 # Since early 2024, Fedora and openSUSE tumbleweed have started
466 # deploying variable-font format of "Noto CJK", causing LaTeX
483 latex_cmd = [self.latexmk_cmd, f"-{self.pdflatex}"]
512 # used with "-j" and that aren't used by other make targets
583 Create man pages from kernel-doc output
586 re_kernel_doc = re.compile(r"^\.\.\s+kernel-doc::\s*(\S+)")
591 # Pick the entire set of kernel-doc markups from the entire tree
599 with open(fname, "r", encoding="utf-8") as in_fp:
609 sys.exit(f"Directory {src_dir} doesn't contain kernel-doc tags")
611 cmd = [ kerneldoc, "-m" ] + sorted(kdoc_files)
619 print(f"Warning: kernel-doc returned {result.returncode} warnings")
640 fp = open(fname, "w", encoding="utf-8")
655 module. It prepares all arguments required by sphinx-build.
662 # Cleandocs doesn't require sphinx-build
672 # Other targets require sphinx-build, so check if it exists
692 args = [ "-b", builder, "-c", docs_dir ]
698 args.extend(["-D", f"latex_elements.papersize={paper}paper"])
701 args.extend(["-t", "rustdoc"])
707 # The sphinx-build tool has a bug: internally, it tries to set
717 # sphinxdirs can be a list or a whitespace-separated string
729 # This is not the best way of handling it, as cross-references between
752 "-d", doctree_dir,
753 "-D", f"kerneldoc_bin={kerneldoc}",
754 "-D", f"version={self.kernelversion}",
755 "-D", f"release={self.kernelrelease}",
756 "-D", f"kerneldoc_srctree={self.srctree}",
782 # sphinx-build finishes
791 Handle valid values for -j. Accepts Sphinx "-jauto", plus a number
818 parser.add_argument("--sphinxdirs", nargs="+",
820 parser.add_argument("--builddir", default="output",
823 parser.add_argument("--theme", help="Sphinx theme to use")
825 parser.add_argument("--css", help="Custom CSS file for HTML/EPUB")
827 parser.add_argument("--paper", choices=PAPER, default=PAPER[0],
830 parser.add_argument('--deny-vf',
833 parser.add_argument("-v", "--verbose", action='store_true',
836 parser.add_argument('-j', '--jobs', type=jobs_type,
837 help="Sets number of jobs to use with sphinx-build")
839 parser.add_argument('-i', '--interactive', action='store_true',
842 parser.add_argument('-s', '--skip-sphinx-build', action='store_true',
843 help="Skip sphinx-build step")
845 parser.add_argument("-V", "--venv", nargs='?', const=f'{VENV_DEFAULT}',