Given the following ifeq
statements, how would this be condensed so strings checks could be handled in one ifeq
block?
OS:=$(shell uname -s)
ifeq ($(OS), Linux)
foo
endif
ifeq ($(OS), Darwin)
bar
endif
ifeq ($(OS), FreeBSD)
bar
endif
ifeq ($(OS), NetBSD)
bar
endif
I've looked into similar Q&A but not sure how it would apply exactly to this question.
Something like this:
ifeq ($(OS), Linux)
foo
endif
ifeq ($(OS) in (Darwin, FreeBSD, NetBSD)) # <- something like this
bar
endif