[llvm] [docs] Do not require recommonmark for manpage build
authorMichał Górny <mgorny@gentoo.org>
Sat, 4 Jul 2020 17:23:48 +0000 (19:23 +0200)
committerMichał Górny <mgorny@gentoo.org>
Tue, 7 Jul 2020 18:59:02 +0000 (20:59 +0200)
commit446e3df25483312c8a7dfb3c53eef0de0e13074a
tree2cd296df7a150f2c1718dd12fd1b717438f01af2
parent7c038726453b76d6f40590b22304c43ffa05aaf1
[llvm] [docs] Do not require recommonmark for manpage build

Do not enforce recommonmark dependency if sphinx is called to build
manpages.  In order to do this, try to import recommonmark first
and do not configure it if it's not available.  Additionally, declare
a custom tags for the selected builder via CMake, and ignore
recommonmark import failure when 'man' target is used.

This will permit us to avoid the problematic recommonmark dependency
for the majority of Gentoo users that do not need to locally build
the complete documentation but want to have tool manpages.

Differential Revision: https://reviews.llvm.org/D83161
llvm/cmake/modules/AddSphinxTarget.cmake
llvm/docs/conf.py