diff options
author | agc <agc> | 1999-07-08 07:58:42 +0000 |
---|---|---|
committer | agc <agc> | 1999-07-08 07:58:42 +0000 |
commit | f7f32a8bd715c20277ab90b3017c528b420030ca (patch) | |
tree | bfc4645d3be5a364bfd6ce5547f60c630146e2b6 /mk/bsd.prefs.mk | |
parent | 9529ce2c87138c1d40104b83fcc03a71c071ccc8 (diff) | |
download | pkgsrc-f7f32a8bd715c20277ab90b3017c528b420030ca.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/bsd.prefs.mk')
-rw-r--r-- | mk/bsd.prefs.mk | 16 |
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} |