mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 04:04:43 +01:00
Merge branch 'tools-final2' into docs-mw
Our documentation-related tools are spread out over various directories; several are buried in the scripts/ dumping ground. That makes them harder to discover and harder to maintain. Recent work has started accumulating our documentation-related tools in /tools/docs. This series nearly completes that task, moving most of the rest of our various utilities there, hopefully fixing up all of the relevant references in the process. The one exception is scripts/kernel-doc; that move turned up some other problems, so I have dropped it until those are ironed out. At the end, rather than move the old, Perl kernel-doc, I simply removed it.
This commit is contained in:
commit
77a22121fe
21 changed files with 28 additions and 2471 deletions
|
|
@ -19,7 +19,7 @@ config WARN_ABI_ERRORS
|
|||
described at Documentation/ABI/README. Yet, as they're manually
|
||||
written, it would be possible that some of those files would
|
||||
have errors that would break them for being parsed by
|
||||
scripts/get_abi.pl. Add a check to verify them.
|
||||
tools/docs/get_abi.py. Add a check to verify them.
|
||||
|
||||
If unsure, select 'N'.
|
||||
|
||||
|
|
|
|||
|
|
@ -8,12 +8,12 @@ subdir- := devicetree/bindings
|
|||
ifneq ($(MAKECMDGOALS),cleandocs)
|
||||
# Check for broken documentation file references
|
||||
ifeq ($(CONFIG_WARN_MISSING_DOCUMENTS),y)
|
||||
$(shell $(srctree)/scripts/documentation-file-ref-check --warn)
|
||||
$(shell $(srctree)/tools/docs/documentation-file-ref-check --warn)
|
||||
endif
|
||||
|
||||
# Check for broken ABI files
|
||||
ifeq ($(CONFIG_WARN_ABI_ERRORS),y)
|
||||
$(shell $(srctree)/scripts/get_abi.py --dir $(srctree)/Documentation/ABI validate)
|
||||
$(shell $(srctree)/tools/docs/get_abi.py --dir $(srctree)/Documentation/ABI validate)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ htmldocs-redirects: $(srctree)/Documentation/.renames.txt
|
|||
@tools/docs/gen-redirects.py --output $(BUILDDIR) < $<
|
||||
|
||||
refcheckdocs:
|
||||
$(Q)cd $(srctree);scripts/documentation-file-ref-check
|
||||
$(Q)cd $(srctree); tools/docs/documentation-file-ref-check
|
||||
|
||||
cleandocs:
|
||||
$(Q)rm -rf $(BUILDDIR)
|
||||
|
|
|
|||
|
|
@ -27,15 +27,15 @@ Usage
|
|||
|
||||
::
|
||||
|
||||
./scripts/checktransupdate.py --help
|
||||
tools/docs/checktransupdate.py --help
|
||||
|
||||
Please refer to the output of argument parser for usage details.
|
||||
|
||||
Samples
|
||||
|
||||
- ``./scripts/checktransupdate.py -l zh_CN``
|
||||
- ``tools/docs/checktransupdate.py -l zh_CN``
|
||||
This will print all the files that need to be updated in the zh_CN locale.
|
||||
- ``./scripts/checktransupdate.py Documentation/translations/zh_CN/dev-tools/testing-overview.rst``
|
||||
- ``tools/docs/checktransupdate.py Documentation/translations/zh_CN/dev-tools/testing-overview.rst``
|
||||
This will only print the status of the specified file.
|
||||
|
||||
Then the output is something like:
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ generate links to that documentation. Adding ``kernel-doc`` directives to
|
|||
the documentation to bring those comments in can help the community derive
|
||||
the full value of the work that has gone into creating them.
|
||||
|
||||
The ``scripts/find-unused-docs.sh`` tool can be used to find these
|
||||
The ``tools/docs/find-unused-docs.sh`` tool can be used to find these
|
||||
overlooked comments.
|
||||
|
||||
Note that the most value comes from pulling in the documentation for
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ a venv with it with, and install minimal requirements with::
|
|||
|
||||
A more comprehensive test can be done by using:
|
||||
|
||||
scripts/test_doc_build.py
|
||||
tools/docs/test_doc_build.py
|
||||
|
||||
Such script create one Python venv per supported version,
|
||||
optionally building documentation for a range of Sphinx versions.
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
:license: GPL Version 2, June 1991 see Linux/COPYING for details.
|
||||
|
||||
The ``kernel-abi`` (:py:class:`KernelCmd`) directive calls the
|
||||
scripts/get_abi.py script to parse the Kernel ABI files.
|
||||
AbiParser class to parse the Kernel ABI files.
|
||||
|
||||
Overview of directive's argument and options.
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
:license: GPL Version 2, June 1991 see Linux/COPYING for details.
|
||||
|
||||
The ``kernel-feat`` (:py:class:`KernelFeat`) directive calls the
|
||||
scripts/get_feat.pl script to parse the Kernel ABI files.
|
||||
tools/docs/get_feat.pl script to parse the Kernel ABI files.
|
||||
|
||||
Overview of directive's argument and options.
|
||||
|
||||
|
|
@ -85,7 +85,7 @@ class KernelFeat(Directive):
|
|||
srctree = os.path.abspath(os.environ["srctree"])
|
||||
|
||||
args = [
|
||||
os.path.join(srctree, 'scripts/get_feat.pl'),
|
||||
os.path.join(srctree, 'tools/docs/get_feat.pl'),
|
||||
'rest',
|
||||
'--enable-fname',
|
||||
'--dir',
|
||||
|
|
|
|||
|
|
@ -28,15 +28,15 @@
|
|||
|
||||
::
|
||||
|
||||
./scripts/checktransupdate.py --help
|
||||
tools/docs/checktransupdate.py --help
|
||||
|
||||
具体用法请参考参数解析器的输出
|
||||
|
||||
示例
|
||||
|
||||
- ``./scripts/checktransupdate.py -l zh_CN``
|
||||
- ``tools/docs/checktransupdate.py -l zh_CN``
|
||||
这将打印 zh_CN 语言中需要更新的所有文件。
|
||||
- ``./scripts/checktransupdate.py Documentation/translations/zh_CN/dev-tools/testing-overview.rst``
|
||||
- ``tools/docs/checktransupdate.py Documentation/translations/zh_CN/dev-tools/testing-overview.rst``
|
||||
这将只打印指定文件的状态。
|
||||
|
||||
然后输出类似如下的内容:
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ C代码编译器发出的警告常常会被视为误报,从而导致出现了
|
|||
这使得这些信息更难找到,例如使Sphinx无法生成指向该文档的链接。将 ``kernel-doc``
|
||||
指令添加到文档中以引入这些注释可以帮助社区获得为编写注释所做工作的全部价值。
|
||||
|
||||
``scripts/find-unused-docs.sh`` 工具可以用来找到这些被忽略的评论。
|
||||
``tools/docs/find-unused-docs.sh`` 工具可以用来找到这些被忽略的评论。
|
||||
|
||||
请注意,将导出的函数和数据结构引入文档是最有价值的。许多子系统还具有供内部
|
||||
使用的kernel-doc注释;除非这些注释放在专门针对相关子系统开发人员的文档中,
|
||||
|
|
|
|||
|
|
@ -437,7 +437,7 @@ git email 默认会抄送给您一份,所以您可以切换为审阅者的角
|
|||
对于首次参与 Linux 内核中文文档翻译的新手,建议您在 linux 目录中运行以下命令:
|
||||
::
|
||||
|
||||
./script/checktransupdate.py -l zh_CN``
|
||||
tools/docs/checktransupdate.py -l zh_CN``
|
||||
|
||||
该命令会列出需要翻译或更新的英文文档,结果同时保存在 checktransupdate.log 中。
|
||||
|
||||
|
|
|
|||
|
|
@ -7411,9 +7411,6 @@ S: Maintained
|
|||
P: Documentation/doc-guide/maintainer-profile.rst
|
||||
T: git git://git.lwn.net/linux.git docs-next
|
||||
F: Documentation/
|
||||
F: scripts/checktransupdate.py
|
||||
F: scripts/documentation-file-ref-check
|
||||
F: scripts/get_abi.py
|
||||
F: scripts/kernel-doc*
|
||||
F: scripts/lib/abi/*
|
||||
F: scripts/lib/kdoc/*
|
||||
|
|
@ -7452,7 +7449,6 @@ M: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|||
L: linux-doc@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/sphinx/parse-headers.pl
|
||||
F: scripts/documentation-file-ref-check
|
||||
F: tools/docs/sphinx-pre-install
|
||||
|
||||
DOCUMENTATION/ITALIAN
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -9,9 +9,9 @@ commit to find the latest english commit from the translation commit
|
|||
differences occur, report the file and commits that need to be updated.
|
||||
|
||||
The usage is as follows:
|
||||
- ./scripts/checktransupdate.py -l zh_CN
|
||||
- tools/docs/checktransupdate.py -l zh_CN
|
||||
This will print all the files that need to be updated or translated in the zh_CN locale.
|
||||
- ./scripts/checktransupdate.py Documentation/translations/zh_CN/dev-tools/testing-overview.rst
|
||||
- tools/docs/checktransupdate.py Documentation/translations/zh_CN/dev-tools/testing-overview.rst
|
||||
This will only print the status of the specified file.
|
||||
|
||||
The output is something like:
|
||||
|
|
@ -168,7 +168,7 @@ def check_per_file(file_path):
|
|||
def valid_locales(locale):
|
||||
"""Check if the locale is valid or not"""
|
||||
script_path = os.path.dirname(os.path.abspath(__file__))
|
||||
linux_path = os.path.join(script_path, "..")
|
||||
linux_path = os.path.join(script_path, "../..")
|
||||
if not os.path.isdir(f"{linux_path}/Documentation/translations/{locale}"):
|
||||
raise ArgumentTypeError("Invalid locale: {locale}")
|
||||
return locale
|
||||
|
|
@ -232,7 +232,7 @@ def config_logging(log_level, log_file="checktransupdate.log"):
|
|||
def main():
|
||||
"""Main function of the script"""
|
||||
script_path = os.path.dirname(os.path.abspath(__file__))
|
||||
linux_path = os.path.join(script_path, "..")
|
||||
linux_path = os.path.join(script_path, "../..")
|
||||
|
||||
parser = ArgumentParser(description="Check the translation update")
|
||||
parser.add_argument(
|
||||
|
|
@ -17,7 +17,7 @@ my %false_positives = (
|
|||
);
|
||||
|
||||
my $scriptname = $0;
|
||||
$scriptname =~ s,.*/([^/]+/),$1,;
|
||||
$scriptname =~ s,tools/docs/([^/]+/),$1,;
|
||||
|
||||
# Parse arguments
|
||||
my $help = 0;
|
||||
|
|
@ -5,10 +5,10 @@
|
|||
# This script detects files with kernel-doc comments for exported functions
|
||||
# that are not included in documentation.
|
||||
#
|
||||
# usage: Run 'scripts/find-unused-docs.sh directory' from top level of kernel
|
||||
# usage: Run 'tools/docs/find-unused-docs.sh directory' from top level of kernel
|
||||
# tree.
|
||||
#
|
||||
# example: $scripts/find-unused-docs.sh drivers/scsi
|
||||
# example: $tools/docs/find-unused-docs.sh drivers/scsi
|
||||
#
|
||||
# Licensed under the terms of the GNU GPL License
|
||||
|
||||
|
|
@ -18,7 +18,7 @@ if ! [ -d "Documentation" ]; then
|
|||
fi
|
||||
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Usage: scripts/find-unused-docs.sh directory"
|
||||
echo "Usage: tools/docs/find-unused-docs.sh directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
@ -18,7 +18,7 @@ my $enable_fname;
|
|||
my $basename = abs_path($0);
|
||||
$basename =~ s,/[^/]+$,/,;
|
||||
|
||||
my $prefix=$basename . "../Documentation/features";
|
||||
my $prefix=$basename . "../../Documentation/features";
|
||||
|
||||
# Used only at for full features output. The script will auto-adjust
|
||||
# such values for the minimal possible values
|
||||
|
|
@ -8,4 +8,4 @@
|
|||
|
||||
ARCH=${1:-$(uname -m | sed 's/x86_64/x86/' | sed 's/i386/x86/' | sed 's/s390x/s390/')}
|
||||
|
||||
$(dirname $0)/../../scripts/get_feat.pl list --arch $ARCH
|
||||
$(dirname $0)/get_feat.pl list --arch $ARCH
|
||||
|
|
@ -313,7 +313,7 @@ class MissingCheckers(AncillaryMethods):
|
|||
Right now, we still need Perl for doc build, as it is required
|
||||
by some tools called at docs or kernel build time, like:
|
||||
|
||||
scripts/documentation-file-ref-check
|
||||
tools/docs/documentation-file-ref-check
|
||||
|
||||
Also, checkpatch is on Perl.
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue