diff --git a/GNUmakefile b/GNUmakefile index c5d7138f..e013db84 100755 --- a/GNUmakefile +++ b/GNUmakefile @@ -44,18 +44,18 @@ IS_SPARC64 := $(shell uname -m | $(GREP) -i -c "sparc64") IS_AIX := $(shell uname -s | $(GREP) -i -c 'aix') IS_SUN := $(shell uname -s | $(GREP) -i -c "SunOS") -IS_LINUX := $(shell $(CXX) -dumpmachine 2>&1 | $(GREP) -i -c "Linux") -IS_MINGW := $(shell $(CXX) -dumpmachine 2>&1 | $(GREP) -i -c "MinGW") -IS_CYGWIN := $(shell $(CXX) -dumpmachine 2>&1 | $(GREP) -i -c "Cygwin") -IS_DARWIN := $(shell $(CXX) -dumpmachine 2>&1 | $(GREP) -i -c "Darwin") -IS_NETBSD := $(shell $(CXX) -dumpmachine 2>&1 | $(GREP) -i -c "NetBSD") +IS_LINUX := $(shell $(CXX) -dumpmachine 2>/dev/null | $(GREP) -i -c "Linux") +IS_MINGW := $(shell $(CXX) -dumpmachine 2>/dev/null | $(GREP) -i -c "MinGW") +IS_CYGWIN := $(shell $(CXX) -dumpmachine 2>/dev/null | $(GREP) -i -c "Cygwin") +IS_DARWIN := $(shell $(CXX) -dumpmachine 2>/dev/null | $(GREP) -i -c "Darwin") +IS_NETBSD := $(shell $(CXX) -dumpmachine 2>/dev/null | $(GREP) -i -c "NetBSD") -SUN_COMPILER := $(shell $(CXX) -V 2>&1 | $(GREP) -i -c -E 'CC: (Sun|Studio)') -GCC_COMPILER := $(shell $(CXX) --version 2>&1 | $(GREP) -v -E '(llvm|clang)' | $(GREP) -i -c -E '(gcc|g\+\+)') -XLC_COMPILER := $(shell $(CXX) $(CXX) -qversion 2>&1 |$(GREP) -i -c "IBM XL") -CLANG_COMPILER := $(shell $(CXX) --version 2>&1 | $(GREP) -i -c -E '(llvm|clang)') -INTEL_COMPILER := $(shell $(CXX) --version 2>&1 | $(GREP) -i -c '\(icc\)') -MACPORTS_COMPILER := $(shell $(CXX) --version 2>&1 | $(GREP) -i -c "macports") +SUN_COMPILER := $(shell $(CXX) -V 2>/dev/null | $(GREP) -i -c -E 'CC: (Sun|Studio)') +GCC_COMPILER := $(shell $(CXX) --version 2>/dev/null | $(GREP) -v -E '(llvm|clang)' | $(GREP) -i -c -E '(gcc|g\+\+)') +XLC_COMPILER := $(shell $(CXX) $(CXX) -qversion 2>/dev/null |$(GREP) -i -c "IBM XL") +CLANG_COMPILER := $(shell $(CXX) --version 2>/dev/null | $(GREP) -i -c -E '(llvm|clang)') +INTEL_COMPILER := $(shell $(CXX) --version 2>/dev/null | $(GREP) -i -c '\(icc\)') +MACPORTS_COMPILER := $(shell $(CXX) --version 2>/dev/null | $(GREP) -i -c "macports") # Sun Studio 12.0 provides SunCC 0x0510; and Sun Studio 12.3 provides SunCC 0x0512 SUNCC_510_OR_LATER := $(shell $(CXX) -V 2>&1 | $(GREP) -i -c -E "CC: (Sun|Studio) .* (5\.1[0-9]|5\.[2-9]|6\.)")