summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authoragc <agc>1999-07-08 07:58:42 +0000
committeragc <agc>1999-07-08 07:58:42 +0000
commit0025e47edc98b966305944b7e924e876175c02eb (patch)
treebfc4645d3be5a364bfd6ce5547f60c630146e2b6 /mk
parent6577150a2518d95757209ed213d3a70cfe0cb4cb (diff)
downloadpkgsrc-0025e47edc98b966305944b7e924e876175c02eb.tar.gz
CAPITAL_OPSYS and OS_MAJOR_VERSION are used in one package Makefile,
but calculated every time bsd.prefs.mk is read. Correct the situation, and only calculate these when they are needed. Also save a few more cycles by hardcoding the LOWER_OPSYS values for known operating systems, rather than using expensive shell echo and tr commands every time bsd.prefs.mk is read.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.prefs.mk16
1 files changed, 8 insertions, 8 deletions
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk
index 65d8b3529bb..e6d72540ae3 100644
--- a/mk/bsd.prefs.mk
+++ b/mk/bsd.prefs.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.9 1999/06/23 17:06:21 christos Exp $
+# $NetBSD: bsd.prefs.mk,v 1.10 1999/07/08 07:58:42 agc Exp $
#
# Make file, included to get the site preferences, if any. Should
# only be included by package Makefiles before any .if defined()
@@ -26,7 +26,6 @@ OPSYS!= ${UNAME} -s
.endif
.ifndef OS_VERSION
OS_VERSION!= ${UNAME} -r
-OS_MAJOR_VERSION!= echo ${OS_VERSION} | sed -e 's/\..*//g'
.endif
# Preload these for architectures not in all variations of bsd.own.mk.
@@ -40,15 +39,16 @@ GNU_ARCH.sparc?= sparc
GNU_ARCH.vax?= vax
MACHINE_GNU_ARCH?= ${GNU_ARCH.${MACHINE_ARCH}}
-.if (${OPSYS} == "SunOS")
+.if ${OPSYS} == "NetBSD"
+LOWER_OPSYS?= netbsd
+.elif ${OPSYS} == "SunOS"
LOWER_VENDOR?= sun
-.endif
-.if !defined(LOWER_OPSYS)
+LOWER_OPSYS?= sunos
+.elif ${OPSYS} == "Linux"
+LOWER_OPSYS?= linux
+.elif !defined(LOWER_OPSYS)
LOWER_OPSYS!= echo ${OPSYS} | tr A-Z a-z
.endif
-.if !defined(CAPITAL_OPSYS)
-CAPITAL_OPSYS!= echo ${OPSYS} | tr a-z A-Z
-.endif
LOWER_VENDOR?=
LOWER_ARCH?= ${MACHINE_GNU_ARCH}