• Mauro Carvalho Chehab's avatar
    scripts: kernel-doc: allow passing desired Sphinx C domain dialect · 93351d41
    Mauro Carvalho Chehab authored
    When kernel-doc is called via kerneldoc.py, there's no need to
    auto-detect the Sphinx version, as the Sphinx module already
    knows it. So, add an optional parameter to allow changing the
    Sphinx dialect.
    
    As kernel-doc can also be manually called, keep the auto-detection
    logic if the parameter was not specified. On such case, emit
    a warning if sphinx-build can't be found at PATH.
    
    I ended using a suggestion from Joe for using a more readable
    regex, instead of using a complex one with a hidden group like:
    
    	m/^(\d+)\.(\d+)(?:\.?(\d+)?)/
    
    in order to get the optional <patch> argument.
    
    Thanks-to: Joe Perches <joe@perches.com>
    Suggested-by: default avatarJonathan Corbet <corbet@lwn.net>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
    93351d41
kernel-doc 65.7 KB