summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2002-02-01 17:27:55 +0000
committerwtc%netscape.com <devnull@localhost>2002-02-01 17:27:55 +0000
commit78fb12f633e8551feccce8909f4e3949102fd88f (patch)
tree1fda06b912b21fc5d88a973a281eb95a074903b7
parent033e2aa53ec68924ec4dfcaf553ee4e0ab3ab7cd (diff)
downloadnss-hg-78fb12f633e8551feccce8909f4e3949102fd88f.tar.gz
Bugzilla bug 122944: detect Cygwin's uname.
-rw-r--r--security/coreconf/arch.mk27
1 files changed, 24 insertions, 3 deletions
diff --git a/security/coreconf/arch.mk b/security/coreconf/arch.mk
index 9d27f4c17..f9878104d 100644
--- a/security/coreconf/arch.mk
+++ b/security/coreconf/arch.mk
@@ -174,9 +174,7 @@ endif
#
# The following hack allows one to build on a WIN95 machine (as if
# s/he were cross-compiling on a WINNT host for a WIN95 target).
-# It also accomodates for MKS's uname.exe. If you never intend
-# to do development on a WIN95 machine, you don't need this. It doesn't
-# work any more anyway.
+# It also accomodates for MKS's and Cygwin's uname.exe.
#
ifeq ($(OS_ARCH),WIN95)
OS_ARCH = WINNT
@@ -186,6 +184,14 @@ ifeq ($(OS_ARCH),Windows_95)
OS_ARCH = Windows_NT
OS_TARGET = WIN95
endif
+ifeq ($(OS_ARCH),CYGWIN_95-4.0)
+ OS_ARCH = CYGWIN_NT-4.0
+ OS_TARGET = WIN95
+endif
+ifeq ($(OS_ARCH),CYGWIN_98-4.10)
+ OS_ARCH = CYGWIN_NT-4.0
+ OS_TARGET = WIN95
+endif
#
# On WIN32, we also define the variable CPU_ARCH.
@@ -220,6 +226,21 @@ ifeq ($(OS_ARCH), Windows_NT)
CPU_ARCH = x386
endif
endif
+#
+# If uname -s returns "CYGWIN_NT-4.0", we assume that we are using
+# the uname.exe in the Cygwin tools.
+#
+ifeq (CYGWIN_NT,$(findstring CYGWIN_NT,$(OS_ARCH)))
+ OS_RELEASE := $(patsubst CYGWIN_NT-%,%,$(OS_ARCH))
+ OS_ARCH = WINNT
+ CPU_ARCH := $(shell uname -m)
+ #
+ # Cygwin's uname -m returns "i686" on a Pentium Pro machine.
+ #
+ ifneq (,$(findstring 86,$(CPU_ARCH)))
+ CPU_ARCH = x86
+ endif
+endif
endif
ifndef OS_TARGET