Fix $filter and Msys/Cygwin

- switched the patter and input of $filter into the right places
- added pattern wildcard to MSYS_NT & CYGWIN_NT as they change with windows versions
- correctly identify MSYS2, even in an env like MINGW64
This commit is contained in:
Quentin Boswank
2024-06-05 18:37:27 +02:00
parent 2acf90431a
commit f19c98228f
8 changed files with 26 additions and 18 deletions
+4 -4
View File
@@ -271,8 +271,8 @@ clean:
#----------------------------------------------------------------------------------
# valgrind tests validated only for some posix platforms
#----------------------------------------------------------------------------------
UNAME := $(shell uname)
ifneq (,$(filter $(UNAME),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS AIX CYGWIN_NT))
UNAME := $(shell sh -c 'MSYSTEM="MSYS" uname')
ifneq (,$(filter Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS AIX CYGWIN_NT%,$(UNAME)))
HOST_OS = POSIX
.PHONY: test-valgrind
@@ -300,10 +300,10 @@ endif
#-----------------------------------------------------------------------------
# make tests validated only for below targets
#-----------------------------------------------------------------------------
ifneq (,$(filter $(HOST_OS),MSYS POSIX))
ifneq (,$(filter MSYS POSIX,$(HOST_OS)))
DIFF:=diff
ifneq (,$(filter $(UNAME),SunOS))
ifneq (,$(filter SunOS,$(UNAME)))
DIFF:=gdiff
endif