uninstalled: update XDG_DATA_DIRS to point to our devhelp index

When using hotdoc, one can build the documentation for a single
subproject (eg. the GL plugins). In that case, hotdoc will look
up links in devhelp indexes available in standard locations.

To make sure this case works, we thus need to add the path to
our devhelp index to XDG_DATA_DIRS. This also means when running
devhelp from inside the environment, the devhelp books produced
by hotdoc will now show up.
This commit is contained in:
Mathieu Duponchelle 2019-05-25 12:02:37 +02:00
parent 227c35b5d3
commit dc325b42f5

View file

@ -212,6 +212,16 @@ def get_subprocess_env(options, gst_version):
# Add meson/ into PYTHONPATH if we are using a local meson # Add meson/ into PYTHONPATH if we are using a local meson
prepend_env_var(env, 'PYTHONPATH', mesonpath) prepend_env_var(env, 'PYTHONPATH', mesonpath)
# For devhelp books
if not 'XDG_DATA_DIRS' in env or not env['XDG_DATA_DIRS']:
# Preserve default paths when empty
prepend_env_var(env, 'XDG_DATA_DIRS', '/usr/local/share/:/usr/share/')
prepend_env_var (env, 'XDG_DATA_DIRS', os.path.join(options.builddir,
'subprojects',
'gst-docs',
'GStreamer-doc'))
return env return env
def get_windows_shell(): def get_windows_shell():