diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2020-06-03 17:28:41 +0100 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2020-06-13 18:48:35 +0000 |
commit | 9f0e75bb409e07f27f4f75663572c2139a860f20 (patch) | |
tree | dc11156c5025665d02afadf90a3feb2292aad93c /mesonbuild/scripts/gtkdochelper.py | |
parent | b91355a29b2aac57a118b813d6166c0e8dea481d (diff) | |
download | meson-9f0e75bb409e07f27f4f75663572c2139a860f20.zip meson-9f0e75bb409e07f27f4f75663572c2139a860f20.tar.gz meson-9f0e75bb409e07f27f4f75663572c2139a860f20.tar.bz2 |
Also adjust PATH in gtkdochelper for Cygwin
Also do Windows loader specific PATH adjustment (to emulate rpath) in
gtkdochelper for Cygwin.
Diffstat (limited to 'mesonbuild/scripts/gtkdochelper.py')
-rw-r--r-- | mesonbuild/scripts/gtkdochelper.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mesonbuild/scripts/gtkdochelper.py b/mesonbuild/scripts/gtkdochelper.py index 6b174a6..812604a 100644 --- a/mesonbuild/scripts/gtkdochelper.py +++ b/mesonbuild/scripts/gtkdochelper.py @@ -16,7 +16,7 @@ import sys, os import subprocess import shutil import argparse -from ..mesonlib import MesonException, Popen_safe, is_windows, split_args +from ..mesonlib import MesonException, Popen_safe, is_windows, is_cygwin, split_args from . import destdir_join parser = argparse.ArgumentParser() @@ -55,16 +55,18 @@ def gtkdoc_run_check(cmd, cwd, library_paths=None): library_paths = [] env = dict(os.environ) - if is_windows(): + if is_windows() or is_cygwin(): if 'PATH' in env: library_paths.extend(env['PATH'].split(os.pathsep)) env['PATH'] = os.pathsep.join(library_paths) - cmd.insert(0, sys.executable) else: if 'LD_LIBRARY_PATH' in env: library_paths.extend(env['LD_LIBRARY_PATH'].split(os.pathsep)) env['LD_LIBRARY_PATH'] = os.pathsep.join(library_paths) + if is_windows(): + cmd.insert(0, sys.executable) + # Put stderr into stdout since we want to print it out anyway. # This preserves the order of messages. p, out = Popen_safe(cmd, cwd=cwd, env=env, stderr=subprocess.STDOUT)[0:2] |