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>
This commit is contained in:
parent
a44e4aaef9
commit
2d5b83197a
|
@ -13,6 +13,14 @@ config HAVE_DOT_CONFIG
|
||||||
bool
|
bool
|
||||||
default y
|
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 "target/Config.in"
|
||||||
|
|
||||||
source "config/Config-images.in"
|
source "config/Config-images.in"
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
[ "$(uname)" = "$1" ] && echo y || echo n
|
Loading…
Reference in New Issue