summaryrefslogtreecommitdiff
path: root/mk/bsd.prefs.mk
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2013-02-10 12:25:17 +0000
committerobache <obache@pkgsrc.org>2013-02-10 12:25:17 +0000
commita5bcf0acd4a4178e01566561d3c72ad3465881e5 (patch)
treeb03633e1dc529d7b29fc6e35cfe3e2f8a61e563d /mk/bsd.prefs.mk
parenta7265813032eb7f1c59ec4c1a89811cce29f1219 (diff)
downloadpkgsrc-a5bcf0acd4a4178e01566561d3c72ad3465881e5.tar.gz
Add preference for Cygwin.
Diffstat (limited to 'mk/bsd.prefs.mk')
-rw-r--r--mk/bsd.prefs.mk13
1 files changed, 11 insertions, 2 deletions
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk
index af49effce5b..145ba687e12 100644
--- a/mk/bsd.prefs.mk
+++ b/mk/bsd.prefs.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.330 2013/01/23 17:02:23 tron Exp $
+# $NetBSD: bsd.prefs.mk,v 1.331 2013/02/10 12:25:17 obache Exp $
#
# This file includes the mk.conf file, which contains the user settings.
#
@@ -70,7 +70,7 @@ UNAME=echo Unknown
.endif
.if !defined(OPSYS)
-OPSYS:= ${:!${UNAME} -s!:S/-//g:S/\///g}
+OPSYS:= ${:!${UNAME} -s!:S/-//g:S/\///g:C/^CYGWIN_.*$/Cygwin/}
MAKEFLAGS+= OPSYS=${OPSYS:Q}
.endif
@@ -128,6 +128,13 @@ LOWER_VENDOR?= ibm
.elif ${OPSYS} == "BSDOS"
LOWER_OPSYS?= bsdi
+.elif ${OPSYS} == "Cygwin"
+LOWER_OPSYS?= cygwin
+LOWER_VENDOR?= pc
+LOWER_ARCH!= ${UNAME} -m
+_OS_VERSION!= ${UNAME} -r
+OS_VERSION= ${_OS_VERSION:C/\(.*\)//}
+
.elif ${OPSYS} == "Darwin"
LOWER_OPSYS?= darwin
.if empty(OS_VERSION:M[1-9].*.*)
@@ -371,6 +378,8 @@ OBJECT_FMT= ELF
. else
OBJECT_FMT= SOM
. endif
+.elif ${OPSYS} == "Cygwin"
+OBJECT_FMT= PE
.endif
# Calculate depth