Updated cpuflags to 0.17

Update MAKE_FLAGS so we can affect imake using packages
This commit is contained in:
abs 2002-01-03 11:54:47 +00:00
parent 2baa02b807
commit cc8fc92d23
3 changed files with 15 additions and 10 deletions

View file

@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.16 2002/01/01 17:01:26 abs Exp $
# $NetBSD: Makefile,v 1.17 2002/01/03 11:54:47 abs Exp $
#
DISTNAME= cpuflags-0.16
DISTNAME= cpuflags-0.17
CATEGORIES= sysutils
MASTER_SITES= # empty
DISTFILES= # empty

View file

@ -1,4 +1,4 @@
.\" $NetBSD: cpuflags.1,v 1.5 2001/12/24 13:25:47 abs Exp $
.\" $NetBSD: cpuflags.1,v 1.6 2002/01/03 11:54:47 abs Exp $
.Dd May 31, 2001
.Dt CPUFLAGS 1
.Os
@ -19,7 +19,8 @@ The makefile fragment
.Pa /usr/pkg/share/mk/cpuflags.mk
will set the following
.Xr make 1
variables. The first two are explicitly added to MAKE_ENV.
variables. The first two are explicitly added to MAKE_ENV, while MAKE_FLAGS
will have CCOPTIONS=${CPU_FLAGS}
.Bl -tag -width CPU_FLAGS -compact
.It
.It CPU_FLAGS
@ -49,8 +50,7 @@ kernel or userland by adding the following to /etc/mk.conf.
.Ed
.Sh BUGS
.Nm
does not know about many cpu types yet - updates welcomed to <abs@netbsd.org>,
and does not affect packages using imake.
does not know about many cpu types yet - updates welcomed to <abs@netbsd.org>.
.Pp
Currently
.Nm

View file

@ -1,9 +1,9 @@
# $Id: cpuflags.mk,v 1.2 2001/12/24 13:25:47 abs Exp $
# $Id: cpuflags.mk,v 1.3 2002/01/03 11:54:47 abs Exp $
# Makefile include fragment to simplify use of cpuflags in pkgsrc
# abs@netbsd.org - freely distributable, no warrenties, stick no bills.
# Try to optimise based on CPU
# Does not affect Imakefiles, and any package that overrides CFLAGS/CXXFLAGS
# Does not affect any package that overrides CFLAGS/CXXFLAGS/CCOPTIONS
# Sets five variables:
#
# CPU_FLAGS The output of cpuflags
@ -12,13 +12,18 @@
#
# CPU_DIR CPU_FLAGS with spaces stripped (eg: for use in PACKAGES)
# LOWER_CPU_DIR As CPU_FLAGS but all lower case
#
.if ! defined(CPU_FLAGS)
CPU_FLAGS!=/usr/pkg/bin/cpuflags
CPU_DIR!=echo ${CPU_FLAGS} | sed 's/ //'
LOWER_CPU_DIR!=echo ${CPU_DIR} | tr A-Z a-z
MAKE_ENV+=CPU_FLAGS=${CPU_FLAGS} CPU_DIR=${CPU_DIR}
CFLAGS+=${CPU_FLAGS}
CXXFLAGS+=${CPU_FLAGS}
# Make the flags available to make
MAKE_ENV+=CPU_FLAGS=${CPU_FLAGS} CPU_DIR=${CPU_DIR}
# Override CCOPTIONS for imake
MAKE_FLAGS+=CCOPTIONS=${CPU_FLAGS}
.endif