mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2025-02-16 23:27:17 +02:00
Make more expressive HOST_*
macro system
This commit is contained in:
parent
75d509eb08
commit
57dc4fc878
1 changed files with 14 additions and 0 deletions
14
mk/lib.mk
14
mk/lib.mk
|
@ -14,20 +14,34 @@ install-tests-groups :=
|
||||||
|
|
||||||
ifdef HOST_OS
|
ifdef HOST_OS
|
||||||
HOST_KERNEL = $(firstword $(subst -, ,$(HOST_OS)))
|
HOST_KERNEL = $(firstword $(subst -, ,$(HOST_OS)))
|
||||||
|
ifeq ($(patsubst mingw%,,$(HOST_KERNEL)),)
|
||||||
|
HOST_MINGW = 1
|
||||||
|
HOST_WINDOWS = 1
|
||||||
|
endif
|
||||||
ifeq ($(HOST_KERNEL), cygwin)
|
ifeq ($(HOST_KERNEL), cygwin)
|
||||||
HOST_CYGWIN = 1
|
HOST_CYGWIN = 1
|
||||||
|
HOST_WINDOWS = 1
|
||||||
|
HOST_UNIX = 1
|
||||||
endif
|
endif
|
||||||
ifeq ($(patsubst darwin%,,$(HOST_KERNEL)),)
|
ifeq ($(patsubst darwin%,,$(HOST_KERNEL)),)
|
||||||
HOST_DARWIN = 1
|
HOST_DARWIN = 1
|
||||||
|
HOST_UNIX = 1
|
||||||
endif
|
endif
|
||||||
ifeq ($(patsubst freebsd%,,$(HOST_KERNEL)),)
|
ifeq ($(patsubst freebsd%,,$(HOST_KERNEL)),)
|
||||||
HOST_FREEBSD = 1
|
HOST_FREEBSD = 1
|
||||||
|
HOST_UNIX = 1
|
||||||
|
endif
|
||||||
|
ifeq ($(patsubst netbsd%,,$(HOST_KERNEL)),)
|
||||||
|
HOST_NETBSD = 1
|
||||||
|
HOST_UNIX = 1
|
||||||
endif
|
endif
|
||||||
ifeq ($(HOST_KERNEL), linux)
|
ifeq ($(HOST_KERNEL), linux)
|
||||||
HOST_LINUX = 1
|
HOST_LINUX = 1
|
||||||
|
HOST_UNIX = 1
|
||||||
endif
|
endif
|
||||||
ifeq ($(patsubst solaris%,,$(HOST_KERNEL)),)
|
ifeq ($(patsubst solaris%,,$(HOST_KERNEL)),)
|
||||||
HOST_SOLARIS = 1
|
HOST_SOLARIS = 1
|
||||||
|
HOST_UNIX = 1
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue