<div dir="ltr">Thanks! I committed these in r206655, r206660, and r206662.<div><br></div><div>I tested the LLVM and clang docs and fixed some issues, but I'm not set up to build lld on Linux at the moment.</div><div><br>
</div><div>This didn't work for me on Windows because sphinx-build isn't an exe.  The right fix is probably to prefix the command with ${PYTHON_EXECUTABLE}, but that can be separate.</div><div><br></div><div>I also made the output quiet (-q) and made warnings into errors (-W), since this is really what we want in a build.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 18, 2014 at 2:22 PM, Dan Liew <span dir="ltr"><<a href="mailto:dan@su-root.co.uk" target="_blank">dan@su-root.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Okay here is the third version of the patch. I've removed the<br>
docs-llvm-linkcheck target and I've changed the add_sphinx_target()<br>
function so that the project name is specified as the second argument.<br>
This is necessary because when clang and lld are built inside the LLVM<br>
source tree they don't call ``project()`` and so CMAKE_PROJECT_NAME is<br>
still LLVM and so this would cause problems because<br>
add_sphinx_target() would try to create another target with the same<br>
name.<br>
<br>
I've also attached a rough patch for clang and lld which allows their<br>
documentation to be built and installed too provided the following<br>
conditions are met<br>
<br>
* LLVM_SPHINX_ENABLE and LLVM_BUILD_DOCS are enabled<br>
* lld and clang are inside the LLVM source tree (i.e. located at<br>
tools/lld and tools/clang)<br>
<br>
I realise patches to clang and lld need to go to their respective<br>
mailing lists but I thought I would show these to prove that the<br>
add_sphinx_target() function could be reused across projects. If my<br>
LLVM patch gets into trunk then we can look into getting the clang and<br>
lld patches into their respective projects.<br>
<br>
Unfortunately building documentation for Clang or lld won't work if<br>
Clang or lld are being built against LLVM as a library because the<br>
LLVM CMake variables (e.g. LLVM_SPHINX_ENABLE) will not be set and the<br>
add_sphinx_target() function won't be available. Maintainers of Clang<br>
and lld would need to include their own copy of AddSphinxTarget.cmake<br>
and have their own variables to enable building documentation to<br>
support this.<br>
<br>
Thanks,<br>
Dan.<br>
<div class="HOEnZb"><div class="h5"><br>
On 17 April 2014 22:58, Dan Liew <<a href="mailto:dan@su-root.co.uk">dan@su-root.co.uk</a>> wrote:<br>
>> This is looking really good. I would like to remove the linkcheck target<br>
>> just on the principle that the build should not go accessing external<br>
>> websites.<br>
><br>
> Sure. I feel as if users should still be made aware of this feature (I<br>
> certainly didn't know about it before I started this work).<br>
><br>
> Would it be okay to add information about how to check links manually<br>
> to <a href="http://llvm.org/docs/SphinxQuickstartTemplate.html" target="_blank">http://llvm.org/docs/SphinxQuickstartTemplate.html</a> as a separate<br>
> patch?<br>
><br>
> Since I'm going to rework the patch again I'd like to ask people's<br>
> opinions on a few things before I start<br>
><br>
> - Are the names of the targets okay?<br>
><br>
> * docs-llvm-html<br>
> * docs-llvm-man<br>
><br>
> i.e. if you build with LLVM_ENABLE_SPHINX you can type ``make<br>
> docs-llvm-html`` and ``make docs-llvm-man`` to build documentation.<br>
><br>
> - I've assumed the add_sphinx_target() function is reusable by other<br>
> projects like Clang and lldb. This might not be the case depending on<br>
> how these projects interact with LLVM's CMake build system. I've only<br>
> ever built Clang inside the LLVM tree (a case where reusing<br>
> add_sphinx_target should work) but I'm sure I remember reading<br>
> somewhere that Clang can be built out of tree and in that case I have<br>
> doubts about reusing add_sphinx_target() working. I've never even<br>
> built lldb but the instructions seem to say I should build in tree.<br>
><br>
>  Would it be worth trying to apply the add_sphinx_target() functin to<br>
> Clang and lldb as well?<br>
><br>
><br>
>> You should send 0002 in a separate patch thread. I don't really have the<br>
>> knowledge to sign off on it. I think you'll want to CC chapuni or chandler.<br>
><br>
> Sure I'll do that.<br>
><br>
> Thanks,<br>
> --<br>
> Dan Liew<br>
> PhD Student - Imperial College London<br>
<br>
<br>
<br>
--<br>
Dan Liew<br>
PhD Student - Imperial College London<br>
</div></div><br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>