Skip to content

Commit

Permalink
build: add HOST_OS_LINUX and HOST_OS_MACOS config symbols
Browse files Browse the repository at this point in the history
This can be used to simplify host os tests in various places

Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
nbd168 committed Nov 1, 2021
1 parent a44e4aa commit 2d5b831
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Config.in
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions config/check-uname.sh
@@ -0,0 +1 @@
[ "$(uname)" = "$1" ] && echo y || echo n

0 comments on commit 2d5b831

Please sign in to comment.