logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

OS — module providing operating system information

Authors

Zygmunt Krynicki <me@zygoon.pl> zmk 0.5.1 May 3, 2020 zmk.OS(5)

Description

The module OS provides information about the operating system executing zmk. It can be used to provide tailored behavior and account for differences between UNIX flavours.

History

The OS module first appeared in zmk 0.1

Implementation Notes

Windows is detected by the presence and specific value of the OS environment variable. All other kernels are identified by invoking uname-s.

Name

OS — module providing operating system information

Synopsis

include z.mk $(eval $(call ZMK.Import,OS))

Targets

This module does not provide any targets.

Variables

This module provides the following variables. OS.Kernel Identifier of the operating system kernel. Known values are listed in the following table. ┌──────────────┬───────────────────────────────────────┐ │ ValueDescription │ ├──────────────┼───────────────────────────────────────┤ │ Darwin │ The MacOS kernel │ │ FreeBSD │ The FreeBSD kernel │ │ GNU/kFreeBSD │ The FreeBSD kernel with GNU userspace │ │ GNU │ The Hurd kernel │ │ Linux │ All Linux kernel │ │ NetBSD │ The NetBSD kernel │ │ OpenBSD │ The OpenBSD kernel │ │ SunOS │ The Solaris kernel │ │ Windows_NT │ The Windows kernel │ │ Haiku │ The Haiku kernel │ └──────────────┴───────────────────────────────────────┘ OS.ImageFormat Identifier or the application image format used. ┌────────┬───────────────────────────────────────────────┐ │ ValueDescription │ ├────────┼───────────────────────────────────────────────┤ │ ELF │ Used by most UNIX-like systems, except Darwin │ │ Mach-O │ Used by MacOS │ │ PE │ Used by Windows │ │ MZ │ Used by DOS │ └────────┴───────────────────────────────────────────────┘ Due to cross-compiling it is more useful to look at Toolchain.ImageFormat instead.

See Also