build: add HOST_OS_LINUX and HOST_OS_MACOS config symbols

This can be used to simplify host os tests in various places

Signed-off-by: Felix Fietkau <nbd@nbd.name>
openwrt-22.03
Felix Fietkau 4 years ago
parent a44e4aaef9
commit 2d5b83197a

@ -13,6 +13,14 @@ config HAVE_DOT_CONFIG
bool
default y
HOST_OS := $(shell, uname)
config HOST_OS_LINUX
def_bool $(shell, ./config/check-uname.sh Linux)
config HOST_OS_MACOS
def_bool $(shell, ./config/check-uname.sh Darwin)
source "target/Config.in"
source "config/Config-images.in"

@ -0,0 +1 @@
[ "$(uname)" = "$1" ] && echo y || echo n
Loading…
Cancel
Save