aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/envconfig.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2019-08-23 09:02:30 -0700
committerJussi Pakkanen <jpakkane@gmail.com>2019-08-27 21:07:12 +0300
commitd3a7537346a163d37db040d8437901165844d62d (patch)
tree37bc3c6ca9bf1ccf03834cabea167fd6f7f5e6d4 /mesonbuild/envconfig.py
parenta107eab2949cf9750ed88a634118b31666c16c7a (diff)
downloadmeson-d3a7537346a163d37db040d8437901165844d62d.zip
meson-d3a7537346a163d37db040d8437901165844d62d.tar.gz
meson-d3a7537346a163d37db040d8437901165844d62d.tar.bz2
envconfig: Add missing MachineInfo is_<os> methods
mesonlib defines is_sunos, is_dragonflybsd, and is_freebsd, which MachineInfo does not. This should be corrected.
Diffstat (limited to 'mesonbuild/envconfig.py')
-rw-r--r--mesonbuild/envconfig.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
index 5889eb1..ab39b0d 100644
--- a/mesonbuild/envconfig.py
+++ b/mesonbuild/envconfig.py
@@ -245,6 +245,19 @@ class MachineInfo:
"""
return self.system == 'openbsd'
+ def is_dragonflybsd(self) -> bool:
+ """Machine is DragonflyBSD?"""
+ return self.system == 'dragonfly'
+
+ def is_freebsd(self) -> bool:
+ """Machine is FreeBSD?"""
+ return self.system == 'freebsd'
+
+ def is_sunos(self) -> bool:
+ """Machine is illumos or Solaris?"""
+ return self.system == 'sunos'
+
+
# Various prefixes and suffixes for import libraries, shared libraries,
# static libraries, and executables.
# Versioning is added to these names in the backends as-needed.