Skip to content

Commit

Permalink
Make more expressive HOST_* macro system
Browse files Browse the repository at this point in the history
  • Loading branch information
Ericson2314 committed Oct 21, 2023
1 parent 20e4580 commit 1a73c39
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions mk/lib.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,34 @@ install-tests-groups :=

ifdef HOST_OS
HOST_KERNEL = $(firstword $(subst -, ,$(HOST_OS)))
ifeq ($(patsubst mingw%,,$(HOST_KERNEL)),)
HOST_MINGW = 1
HOST_WINDOWS = 1
endif
ifeq ($(HOST_KERNEL), cygwin)
HOST_CYGWIN = 1
HOST_WINDOWS = 1
HOST_UNIX = 1
endif
ifeq ($(patsubst darwin%,,$(HOST_KERNEL)),)
HOST_DARWIN = 1
HOST_UNIX = 1
endif
ifeq ($(patsubst freebsd%,,$(HOST_KERNEL)),)
HOST_FREEBSD = 1
HOST_UNIX = 1
endif
ifeq ($(patsubst netbsd%,,$(HOST_KERNEL)),)
HOST_NETBSD = 1
HOST_UNIX = 1
endif
ifeq ($(HOST_KERNEL), linux)
HOST_LINUX = 1
HOST_UNIX = 1
endif
ifeq ($(patsubst solaris%,,$(HOST_KERNEL)),)
HOST_SOLARIS = 1
HOST_UNIX = 1
endif
endif

Expand Down

0 comments on commit 1a73c39

Please sign in to comment.