add bits for AIX to correctly set MACHINE_ARCH and OS_VERSION, so that

MACHINE_GNU_PLATFORM is set to something sane. tested with AIX 4.3.3
and 5.1.
This commit is contained in:
grant 2005-02-17 07:11:59 +00:00
parent 1b4356bcb8
commit 581576f963

View file

@ -1,4 +1,4 @@
# $NetBSD: bsd.prefs.mk,v 1.180 2005/02/11 16:11:36 tv Exp $
# $NetBSD: bsd.prefs.mk,v 1.181 2005/02/17 07:11:59 grant Exp $
#
# Make file, included to get the site preferences, if any. Should
# only be included by package Makefiles before any .if defined()
@ -172,6 +172,25 @@ OS_VERSION!= echo ${OS_VERSION} | sed -e 's/^V//'
LOWER_OPSYS?= osf${OS_VERSION}
LOWER_VENDOR?= dec
.elif ${OPSYS} == "AIX"
LOWER_ARCH!= _cpuid=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $$1 }'`; \
if /usr/sbin/lsattr -El $$_cpuid | grep ' POWER' >/dev/null 2>&1; then \
echo rs6000; \
else \
echo powerpc; \
fi
MACHINE_ARCH?= ${LOWER_ARCH}
. if exists(/usr/bin/oslevel)
_OS_VERSION!= /usr/bin/oslevel
. else
_OS_VERSION!= echo `${UNAME} -v`.`${UNAME} -r`
. endif
OS_VERSION!= echo ${_OS_VERSION} | sed -e 's,\([0-9]*\.[0-9]*\).*,\1,'
LOWER_OS_VERSION= ${OS_VERSION}
LOWER_OPSYS_VERSUFFIX= ${_OS_VERSION}
LOWER_OPSYS?= aix
LOWER_VENDOR?= ibm
.elif !defined(LOWER_OPSYS)
LOWER_OPSYS!= echo ${OPSYS} | tr A-Z a-z
.endif