docs: allow out-of-tree docs build
Hawkmoth runs from the build-directory, which makes sense. However, we set up a bunch of source-relative include paths, which will break if we don't build in-tree. Let's make these relative to the source-tree instead. We can deduce the source-root from the parent directory of the current file. Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Eric Engestrom <eric@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11494>
This commit is contained in:

committed by
Marge Bot

parent
09c1f3b9fd
commit
69809a0384
13
docs/conf.py
13
docs/conf.py
@@ -219,13 +219,14 @@ graphviz_output_format = 'svg'
|
||||
# -- Options for hawkmoth -------------------------------------------------
|
||||
|
||||
hawkmoth_root = os.path.abspath(os.pardir)
|
||||
mesa_root = os.path.join(os.path.dirname(__file__), os.pardir)
|
||||
hawkmoth_clang = [
|
||||
'-Idocs/header-stubs/',
|
||||
'-Iinclude/',
|
||||
'-Isrc/',
|
||||
'-Isrc/gallium/include/',
|
||||
'-Isrc/intel/',
|
||||
'-Isrc/mesa/',
|
||||
'-I{}/docs/header-stubs/'.format(mesa_root),
|
||||
'-I{}/include/'.format(mesa_root),
|
||||
'-I{}/src/'.format(mesa_root),
|
||||
'-I{}/src/gallium/include/'.format(mesa_root),
|
||||
'-I{}/src/intel/'.format(mesa_root),
|
||||
'-I{}/src/mesa/'.format(mesa_root),
|
||||
'-DHAVE_STRUCT_TIMESPEC',
|
||||
'-DHAVE_PTHREAD',
|
||||
'-DHAVE_ENDIAN_H',
|
||||
|
Reference in New Issue
Block a user