2001-03-24 22:06:52 +01:00
|
|
|
# $NetBSD: bsd.prefs.mk,v 1.31 2001/03/24 21:06:52 tron Exp $
|
1998-06-03 13:15:29 +02:00
|
|
|
#
|
|
|
|
# Make file, included to get the site preferences, if any. Should
|
|
|
|
# only be included by package Makefiles before any .if defined()
|
Implement some parts of proposals posted to tech-pkg:
- Define OS_VERSION in bsd.prefs.mk (...if not already defined). Previously
was only set in a conditional block in bsd.pkg.mk.
- Define new values, MACHINE_PLATFORM and MACHINE_GNU_PLATFORM, which
default to ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH} and
${LOWER_OPSYS}-${LOWER_VENDOR}-${LOWER_ARCH} respectively.
(Probably should nuke LOWER_ARCH and rename LOWER_VENDOR to something
like MACHINE_GNU_VENDOR.)
- Use ${MACHINE_GNU_PLATFORM} as the argument to `--host' in GNU_CONFIGURE
packages.
- Allow for ONLY_FOR_PLATFORM and NOT_FOR_PLATFORM, lists of patterns
in csh(1) glob style which are matched against MACHINE_PLATFORM above
and take the place of {ONLY,NOT}_FOR_{ARCHS,OPSYS}. (For now, until
all pkgs are converted, provide backwards compatibility.) *Both* may
be defined, in which case NOT_FOR_PLATFORM takes precedence.
- Also do some significant aesthetic cleanup, based on the idea
`define platform-specific overrides first, then define a generic case
with the ?= operator'. Lots more of this to do yet.
1999-05-24 20:42:00 +02:00
|
|
|
# statements or modifications to "passed" variables (CFLAGS, LDFLAGS, ...),
|
|
|
|
# to make sure any variables defined in /etc/mk.conf, $MAKECONF, or
|
|
|
|
# the system defaults (sys.mk and bsd.own.mk) are used.
|
1998-06-03 13:15:29 +02:00
|
|
|
|
1999-05-24 00:10:01 +02:00
|
|
|
# Do not recursively include mk.conf, redefine OPSYS, include bsd.own.mk, etc.
|
|
|
|
.ifndef BSD_PKG_MK
|
|
|
|
|
Implement some parts of proposals posted to tech-pkg:
- Define OS_VERSION in bsd.prefs.mk (...if not already defined). Previously
was only set in a conditional block in bsd.pkg.mk.
- Define new values, MACHINE_PLATFORM and MACHINE_GNU_PLATFORM, which
default to ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH} and
${LOWER_OPSYS}-${LOWER_VENDOR}-${LOWER_ARCH} respectively.
(Probably should nuke LOWER_ARCH and rename LOWER_VENDOR to something
like MACHINE_GNU_VENDOR.)
- Use ${MACHINE_GNU_PLATFORM} as the argument to `--host' in GNU_CONFIGURE
packages.
- Allow for ONLY_FOR_PLATFORM and NOT_FOR_PLATFORM, lists of patterns
in csh(1) glob style which are matched against MACHINE_PLATFORM above
and take the place of {ONLY,NOT}_FOR_{ARCHS,OPSYS}. (For now, until
all pkgs are converted, provide backwards compatibility.) *Both* may
be defined, in which case NOT_FOR_PLATFORM takes precedence.
- Also do some significant aesthetic cleanup, based on the idea
`define platform-specific overrides first, then define a generic case
with the ?= operator'. Lots more of this to do yet.
1999-05-24 20:42:00 +02:00
|
|
|
# Let mk.conf know that this is pkgsrc.
|
1998-11-27 00:39:15 +01:00
|
|
|
BSD_PKG_MK=1
|
Implement some parts of proposals posted to tech-pkg:
- Define OS_VERSION in bsd.prefs.mk (...if not already defined). Previously
was only set in a conditional block in bsd.pkg.mk.
- Define new values, MACHINE_PLATFORM and MACHINE_GNU_PLATFORM, which
default to ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH} and
${LOWER_OPSYS}-${LOWER_VENDOR}-${LOWER_ARCH} respectively.
(Probably should nuke LOWER_ARCH and rename LOWER_VENDOR to something
like MACHINE_GNU_VENDOR.)
- Use ${MACHINE_GNU_PLATFORM} as the argument to `--host' in GNU_CONFIGURE
packages.
- Allow for ONLY_FOR_PLATFORM and NOT_FOR_PLATFORM, lists of patterns
in csh(1) glob style which are matched against MACHINE_PLATFORM above
and take the place of {ONLY,NOT}_FOR_{ARCHS,OPSYS}. (For now, until
all pkgs are converted, provide backwards compatibility.) *Both* may
be defined, in which case NOT_FOR_PLATFORM takes precedence.
- Also do some significant aesthetic cleanup, based on the idea
`define platform-specific overrides first, then define a generic case
with the ?= operator'. Lots more of this to do yet.
1999-05-24 20:42:00 +02:00
|
|
|
__PREFIX_SET__:=${PREFIX}
|
1998-11-27 00:39:15 +01:00
|
|
|
|
1999-06-23 19:06:20 +02:00
|
|
|
.if exists(/usr/bin/uname)
|
|
|
|
UNAME=/usr/bin/uname
|
|
|
|
.elif exists(/bin/uname)
|
|
|
|
UNAME=/bin/uname
|
|
|
|
.else
|
|
|
|
UNAME=echo Unknown
|
|
|
|
.endif
|
|
|
|
|
Implement some parts of proposals posted to tech-pkg:
- Define OS_VERSION in bsd.prefs.mk (...if not already defined). Previously
was only set in a conditional block in bsd.pkg.mk.
- Define new values, MACHINE_PLATFORM and MACHINE_GNU_PLATFORM, which
default to ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH} and
${LOWER_OPSYS}-${LOWER_VENDOR}-${LOWER_ARCH} respectively.
(Probably should nuke LOWER_ARCH and rename LOWER_VENDOR to something
like MACHINE_GNU_VENDOR.)
- Use ${MACHINE_GNU_PLATFORM} as the argument to `--host' in GNU_CONFIGURE
packages.
- Allow for ONLY_FOR_PLATFORM and NOT_FOR_PLATFORM, lists of patterns
in csh(1) glob style which are matched against MACHINE_PLATFORM above
and take the place of {ONLY,NOT}_FOR_{ARCHS,OPSYS}. (For now, until
all pkgs are converted, provide backwards compatibility.) *Both* may
be defined, in which case NOT_FOR_PLATFORM takes precedence.
- Also do some significant aesthetic cleanup, based on the idea
`define platform-specific overrides first, then define a generic case
with the ?= operator'. Lots more of this to do yet.
1999-05-24 20:42:00 +02:00
|
|
|
.ifndef OPSYS
|
1999-06-23 19:06:20 +02:00
|
|
|
OPSYS!= ${UNAME} -s
|
Implement some parts of proposals posted to tech-pkg:
- Define OS_VERSION in bsd.prefs.mk (...if not already defined). Previously
was only set in a conditional block in bsd.pkg.mk.
- Define new values, MACHINE_PLATFORM and MACHINE_GNU_PLATFORM, which
default to ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH} and
${LOWER_OPSYS}-${LOWER_VENDOR}-${LOWER_ARCH} respectively.
(Probably should nuke LOWER_ARCH and rename LOWER_VENDOR to something
like MACHINE_GNU_VENDOR.)
- Use ${MACHINE_GNU_PLATFORM} as the argument to `--host' in GNU_CONFIGURE
packages.
- Allow for ONLY_FOR_PLATFORM and NOT_FOR_PLATFORM, lists of patterns
in csh(1) glob style which are matched against MACHINE_PLATFORM above
and take the place of {ONLY,NOT}_FOR_{ARCHS,OPSYS}. (For now, until
all pkgs are converted, provide backwards compatibility.) *Both* may
be defined, in which case NOT_FOR_PLATFORM takes precedence.
- Also do some significant aesthetic cleanup, based on the idea
`define platform-specific overrides first, then define a generic case
with the ?= operator'. Lots more of this to do yet.
1999-05-24 20:42:00 +02:00
|
|
|
.endif
|
2000-06-04 00:33:22 +02:00
|
|
|
MAKEFLAGS+= OPSYS=${OPSYS}
|
Implement some parts of proposals posted to tech-pkg:
- Define OS_VERSION in bsd.prefs.mk (...if not already defined). Previously
was only set in a conditional block in bsd.pkg.mk.
- Define new values, MACHINE_PLATFORM and MACHINE_GNU_PLATFORM, which
default to ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH} and
${LOWER_OPSYS}-${LOWER_VENDOR}-${LOWER_ARCH} respectively.
(Probably should nuke LOWER_ARCH and rename LOWER_VENDOR to something
like MACHINE_GNU_VENDOR.)
- Use ${MACHINE_GNU_PLATFORM} as the argument to `--host' in GNU_CONFIGURE
packages.
- Allow for ONLY_FOR_PLATFORM and NOT_FOR_PLATFORM, lists of patterns
in csh(1) glob style which are matched against MACHINE_PLATFORM above
and take the place of {ONLY,NOT}_FOR_{ARCHS,OPSYS}. (For now, until
all pkgs are converted, provide backwards compatibility.) *Both* may
be defined, in which case NOT_FOR_PLATFORM takes precedence.
- Also do some significant aesthetic cleanup, based on the idea
`define platform-specific overrides first, then define a generic case
with the ?= operator'. Lots more of this to do yet.
1999-05-24 20:42:00 +02:00
|
|
|
.ifndef OS_VERSION
|
1999-06-23 19:06:20 +02:00
|
|
|
OS_VERSION!= ${UNAME} -r
|
1998-06-03 13:15:29 +02:00
|
|
|
.endif
|
2000-06-04 00:33:22 +02:00
|
|
|
MAKEFLAGS+= OS_VERSION=${OS_VERSION}
|
1998-06-03 13:15:29 +02:00
|
|
|
|
Implement some parts of proposals posted to tech-pkg:
- Define OS_VERSION in bsd.prefs.mk (...if not already defined). Previously
was only set in a conditional block in bsd.pkg.mk.
- Define new values, MACHINE_PLATFORM and MACHINE_GNU_PLATFORM, which
default to ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH} and
${LOWER_OPSYS}-${LOWER_VENDOR}-${LOWER_ARCH} respectively.
(Probably should nuke LOWER_ARCH and rename LOWER_VENDOR to something
like MACHINE_GNU_VENDOR.)
- Use ${MACHINE_GNU_PLATFORM} as the argument to `--host' in GNU_CONFIGURE
packages.
- Allow for ONLY_FOR_PLATFORM and NOT_FOR_PLATFORM, lists of patterns
in csh(1) glob style which are matched against MACHINE_PLATFORM above
and take the place of {ONLY,NOT}_FOR_{ARCHS,OPSYS}. (For now, until
all pkgs are converted, provide backwards compatibility.) *Both* may
be defined, in which case NOT_FOR_PLATFORM takes precedence.
- Also do some significant aesthetic cleanup, based on the idea
`define platform-specific overrides first, then define a generic case
with the ?= operator'. Lots more of this to do yet.
1999-05-24 20:42:00 +02:00
|
|
|
# Preload these for architectures not in all variations of bsd.own.mk.
|
|
|
|
GNU_ARCH.alpha?= alpha
|
|
|
|
GNU_ARCH.arm32?= arm
|
|
|
|
GNU_ARCH.i386?= i386
|
1999-08-12 16:16:25 +02:00
|
|
|
GNU_ARCH.i486?= i386
|
|
|
|
GNU_ARCH.i586?= i386
|
|
|
|
GNU_ARCH.i686?= i386
|
Implement some parts of proposals posted to tech-pkg:
- Define OS_VERSION in bsd.prefs.mk (...if not already defined). Previously
was only set in a conditional block in bsd.pkg.mk.
- Define new values, MACHINE_PLATFORM and MACHINE_GNU_PLATFORM, which
default to ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH} and
${LOWER_OPSYS}-${LOWER_VENDOR}-${LOWER_ARCH} respectively.
(Probably should nuke LOWER_ARCH and rename LOWER_VENDOR to something
like MACHINE_GNU_VENDOR.)
- Use ${MACHINE_GNU_PLATFORM} as the argument to `--host' in GNU_CONFIGURE
packages.
- Allow for ONLY_FOR_PLATFORM and NOT_FOR_PLATFORM, lists of patterns
in csh(1) glob style which are matched against MACHINE_PLATFORM above
and take the place of {ONLY,NOT}_FOR_{ARCHS,OPSYS}. (For now, until
all pkgs are converted, provide backwards compatibility.) *Both* may
be defined, in which case NOT_FOR_PLATFORM takes precedence.
- Also do some significant aesthetic cleanup, based on the idea
`define platform-specific overrides first, then define a generic case
with the ?= operator'. Lots more of this to do yet.
1999-05-24 20:42:00 +02:00
|
|
|
GNU_ARCH.m68k?= m68k
|
|
|
|
GNU_ARCH.mips?= mipsel
|
|
|
|
GNU_ARCH.ns32k?= ns32k
|
|
|
|
GNU_ARCH.sparc?= sparc
|
|
|
|
GNU_ARCH.vax?= vax
|
|
|
|
MACHINE_GNU_ARCH?= ${GNU_ARCH.${MACHINE_ARCH}}
|
1998-08-19 18:23:40 +02:00
|
|
|
|
1999-07-08 09:58:42 +02:00
|
|
|
.if ${OPSYS} == "NetBSD"
|
|
|
|
LOWER_OPSYS?= netbsd
|
|
|
|
.elif ${OPSYS} == "SunOS"
|
2000-06-03 09:16:51 +02:00
|
|
|
. if ${MACHINE_ARCH} == "unknown"
|
|
|
|
. if !defined(LOWER_ARCH)
|
1999-09-18 17:33:55 +02:00
|
|
|
LOWER_ARCH!= ${UNAME} -p
|
2000-06-03 09:16:51 +02:00
|
|
|
. endif # !defined(LOWER_ARCH)
|
2000-06-04 00:33:22 +02:00
|
|
|
MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH}
|
2000-06-03 09:16:51 +02:00
|
|
|
. endif
|
Implement some parts of proposals posted to tech-pkg:
- Define OS_VERSION in bsd.prefs.mk (...if not already defined). Previously
was only set in a conditional block in bsd.pkg.mk.
- Define new values, MACHINE_PLATFORM and MACHINE_GNU_PLATFORM, which
default to ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH} and
${LOWER_OPSYS}-${LOWER_VENDOR}-${LOWER_ARCH} respectively.
(Probably should nuke LOWER_ARCH and rename LOWER_VENDOR to something
like MACHINE_GNU_VENDOR.)
- Use ${MACHINE_GNU_PLATFORM} as the argument to `--host' in GNU_CONFIGURE
packages.
- Allow for ONLY_FOR_PLATFORM and NOT_FOR_PLATFORM, lists of patterns
in csh(1) glob style which are matched against MACHINE_PLATFORM above
and take the place of {ONLY,NOT}_FOR_{ARCHS,OPSYS}. (For now, until
all pkgs are converted, provide backwards compatibility.) *Both* may
be defined, in which case NOT_FOR_PLATFORM takes precedence.
- Also do some significant aesthetic cleanup, based on the idea
`define platform-specific overrides first, then define a generic case
with the ?= operator'. Lots more of this to do yet.
1999-05-24 20:42:00 +02:00
|
|
|
LOWER_VENDOR?= sun
|
1999-07-08 10:06:59 +02:00
|
|
|
LOWER_OPSYS?= solaris
|
1999-07-08 09:58:42 +02:00
|
|
|
.elif ${OPSYS} == "Linux"
|
|
|
|
LOWER_OPSYS?= linux
|
2000-06-03 09:16:51 +02:00
|
|
|
. if ${MACHINE_ARCH} == "unknown"
|
|
|
|
. if !defined(LOWER_ARCH)
|
1999-09-18 17:33:55 +02:00
|
|
|
LOWER_ARCH!= ${UNAME} -m | sed -e 's/[456]86/386/'
|
2000-06-03 09:16:51 +02:00
|
|
|
. endif # !defined(LOWER_ARCH)
|
2000-06-04 00:33:22 +02:00
|
|
|
MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH}
|
2000-06-03 09:16:51 +02:00
|
|
|
. if ${LOWER_ARCH} == "i386"
|
1999-08-12 16:16:25 +02:00
|
|
|
LOWER_VENDOR?= pc
|
2000-06-03 09:16:51 +02:00
|
|
|
. else
|
1999-08-12 16:16:25 +02:00
|
|
|
LOWER_VENDOR?= unknown
|
2000-06-03 09:16:51 +02:00
|
|
|
. endif
|
|
|
|
. endif
|
1999-08-12 16:16:25 +02:00
|
|
|
|
1999-07-08 09:58:42 +02:00
|
|
|
.elif !defined(LOWER_OPSYS)
|
Implement some parts of proposals posted to tech-pkg:
- Define OS_VERSION in bsd.prefs.mk (...if not already defined). Previously
was only set in a conditional block in bsd.pkg.mk.
- Define new values, MACHINE_PLATFORM and MACHINE_GNU_PLATFORM, which
default to ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH} and
${LOWER_OPSYS}-${LOWER_VENDOR}-${LOWER_ARCH} respectively.
(Probably should nuke LOWER_ARCH and rename LOWER_VENDOR to something
like MACHINE_GNU_VENDOR.)
- Use ${MACHINE_GNU_PLATFORM} as the argument to `--host' in GNU_CONFIGURE
packages.
- Allow for ONLY_FOR_PLATFORM and NOT_FOR_PLATFORM, lists of patterns
in csh(1) glob style which are matched against MACHINE_PLATFORM above
and take the place of {ONLY,NOT}_FOR_{ARCHS,OPSYS}. (For now, until
all pkgs are converted, provide backwards compatibility.) *Both* may
be defined, in which case NOT_FOR_PLATFORM takes precedence.
- Also do some significant aesthetic cleanup, based on the idea
`define platform-specific overrides first, then define a generic case
with the ?= operator'. Lots more of this to do yet.
1999-05-24 20:42:00 +02:00
|
|
|
LOWER_OPSYS!= echo ${OPSYS} | tr A-Z a-z
|
|
|
|
.endif
|
2000-06-04 00:33:22 +02:00
|
|
|
MAKEFLAGS+= LOWER_OPSYS=${LOWER_OPSYS}
|
Implement some parts of proposals posted to tech-pkg:
- Define OS_VERSION in bsd.prefs.mk (...if not already defined). Previously
was only set in a conditional block in bsd.pkg.mk.
- Define new values, MACHINE_PLATFORM and MACHINE_GNU_PLATFORM, which
default to ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH} and
${LOWER_OPSYS}-${LOWER_VENDOR}-${LOWER_ARCH} respectively.
(Probably should nuke LOWER_ARCH and rename LOWER_VENDOR to something
like MACHINE_GNU_VENDOR.)
- Use ${MACHINE_GNU_PLATFORM} as the argument to `--host' in GNU_CONFIGURE
packages.
- Allow for ONLY_FOR_PLATFORM and NOT_FOR_PLATFORM, lists of patterns
in csh(1) glob style which are matched against MACHINE_PLATFORM above
and take the place of {ONLY,NOT}_FOR_{ARCHS,OPSYS}. (For now, until
all pkgs are converted, provide backwards compatibility.) *Both* may
be defined, in which case NOT_FOR_PLATFORM takes precedence.
- Also do some significant aesthetic cleanup, based on the idea
`define platform-specific overrides first, then define a generic case
with the ?= operator'. Lots more of this to do yet.
1999-05-24 20:42:00 +02:00
|
|
|
|
|
|
|
LOWER_VENDOR?=
|
|
|
|
LOWER_ARCH?= ${MACHINE_GNU_ARCH}
|
|
|
|
|
|
|
|
MACHINE_PLATFORM?= ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH}
|
1999-05-26 16:47:07 +02:00
|
|
|
MACHINE_GNU_PLATFORM?= ${LOWER_ARCH}-${LOWER_VENDOR}-${LOWER_OPSYS}
|
Implement some parts of proposals posted to tech-pkg:
- Define OS_VERSION in bsd.prefs.mk (...if not already defined). Previously
was only set in a conditional block in bsd.pkg.mk.
- Define new values, MACHINE_PLATFORM and MACHINE_GNU_PLATFORM, which
default to ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH} and
${LOWER_OPSYS}-${LOWER_VENDOR}-${LOWER_ARCH} respectively.
(Probably should nuke LOWER_ARCH and rename LOWER_VENDOR to something
like MACHINE_GNU_VENDOR.)
- Use ${MACHINE_GNU_PLATFORM} as the argument to `--host' in GNU_CONFIGURE
packages.
- Allow for ONLY_FOR_PLATFORM and NOT_FOR_PLATFORM, lists of patterns
in csh(1) glob style which are matched against MACHINE_PLATFORM above
and take the place of {ONLY,NOT}_FOR_{ARCHS,OPSYS}. (For now, until
all pkgs are converted, provide backwards compatibility.) *Both* may
be defined, in which case NOT_FOR_PLATFORM takes precedence.
- Also do some significant aesthetic cleanup, based on the idea
`define platform-specific overrides first, then define a generic case
with the ?= operator'. Lots more of this to do yet.
1999-05-24 20:42:00 +02:00
|
|
|
|
|
|
|
# Needed on NetBSD and SunOS (zoularis) to prevent an "install:" target
|
|
|
|
# from being created in bsd.own.mk.
|
|
|
|
NEED_OWN_INSTALL_TARGET=no
|
|
|
|
|
1999-05-24 00:10:01 +02:00
|
|
|
.include <bsd.own.mk>
|
Implement some parts of proposals posted to tech-pkg:
- Define OS_VERSION in bsd.prefs.mk (...if not already defined). Previously
was only set in a conditional block in bsd.pkg.mk.
- Define new values, MACHINE_PLATFORM and MACHINE_GNU_PLATFORM, which
default to ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH} and
${LOWER_OPSYS}-${LOWER_VENDOR}-${LOWER_ARCH} respectively.
(Probably should nuke LOWER_ARCH and rename LOWER_VENDOR to something
like MACHINE_GNU_VENDOR.)
- Use ${MACHINE_GNU_PLATFORM} as the argument to `--host' in GNU_CONFIGURE
packages.
- Allow for ONLY_FOR_PLATFORM and NOT_FOR_PLATFORM, lists of patterns
in csh(1) glob style which are matched against MACHINE_PLATFORM above
and take the place of {ONLY,NOT}_FOR_{ARCHS,OPSYS}. (For now, until
all pkgs are converted, provide backwards compatibility.) *Both* may
be defined, in which case NOT_FOR_PLATFORM takes precedence.
- Also do some significant aesthetic cleanup, based on the idea
`define platform-specific overrides first, then define a generic case
with the ?= operator'. Lots more of this to do yet.
1999-05-24 20:42:00 +02:00
|
|
|
|
1999-06-23 19:06:20 +02:00
|
|
|
.if (${OPSYS} == "NetBSD") || (${OPSYS} == "SunOS") || (${OPSYS} == "Linux")
|
Implement some parts of proposals posted to tech-pkg:
- Define OS_VERSION in bsd.prefs.mk (...if not already defined). Previously
was only set in a conditional block in bsd.pkg.mk.
- Define new values, MACHINE_PLATFORM and MACHINE_GNU_PLATFORM, which
default to ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH} and
${LOWER_OPSYS}-${LOWER_VENDOR}-${LOWER_ARCH} respectively.
(Probably should nuke LOWER_ARCH and rename LOWER_VENDOR to something
like MACHINE_GNU_VENDOR.)
- Use ${MACHINE_GNU_PLATFORM} as the argument to `--host' in GNU_CONFIGURE
packages.
- Allow for ONLY_FOR_PLATFORM and NOT_FOR_PLATFORM, lists of patterns
in csh(1) glob style which are matched against MACHINE_PLATFORM above
and take the place of {ONLY,NOT}_FOR_{ARCHS,OPSYS}. (For now, until
all pkgs are converted, provide backwards compatibility.) *Both* may
be defined, in which case NOT_FOR_PLATFORM takes precedence.
- Also do some significant aesthetic cleanup, based on the idea
`define platform-specific overrides first, then define a generic case
with the ?= operator'. Lots more of this to do yet.
1999-05-24 20:42:00 +02:00
|
|
|
SHAREOWN?= ${DOCOWN}
|
|
|
|
SHAREGRP?= ${DOCGRP}
|
|
|
|
SHAREMODE?= ${DOCMODE}
|
1998-06-03 13:15:29 +02:00
|
|
|
.endif
|
|
|
|
|
1998-08-19 18:23:40 +02:00
|
|
|
.if defined(PREFIX) && (${PREFIX} != ${__PREFIX_SET__})
|
1998-08-11 21:30:48 +02:00
|
|
|
.BEGIN:
|
|
|
|
@${ECHO_MSG} "You can NOT set PREFIX manually or in mk.conf. Set LOCALBASE or X11BASE"
|
|
|
|
@${ECHO_MSG} "depending on your needs. See the pkg system documentation for more info."
|
|
|
|
@${FALSE}
|
|
|
|
.endif
|
1999-05-24 00:10:01 +02:00
|
|
|
|
2000-01-24 08:04:28 +01:00
|
|
|
# if the system is IPv6-ready NetBSD, compile with IPv6 support turned on.
|
2000-02-13 11:33:22 +01:00
|
|
|
.if (${OPSYS} == "NetBSD") && !defined(USE_SOCKS) && \
|
|
|
|
exists(/usr/include/netinet6)
|
2000-01-24 08:04:28 +01:00
|
|
|
USE_INET6?= YES
|
2000-12-03 15:10:03 +01:00
|
|
|
.else
|
|
|
|
USE_INET6?= NO
|
2000-01-24 08:04:28 +01:00
|
|
|
.endif
|
|
|
|
|
Implement some parts of proposals posted to tech-pkg:
- Define OS_VERSION in bsd.prefs.mk (...if not already defined). Previously
was only set in a conditional block in bsd.pkg.mk.
- Define new values, MACHINE_PLATFORM and MACHINE_GNU_PLATFORM, which
default to ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH} and
${LOWER_OPSYS}-${LOWER_VENDOR}-${LOWER_ARCH} respectively.
(Probably should nuke LOWER_ARCH and rename LOWER_VENDOR to something
like MACHINE_GNU_VENDOR.)
- Use ${MACHINE_GNU_PLATFORM} as the argument to `--host' in GNU_CONFIGURE
packages.
- Allow for ONLY_FOR_PLATFORM and NOT_FOR_PLATFORM, lists of patterns
in csh(1) glob style which are matched against MACHINE_PLATFORM above
and take the place of {ONLY,NOT}_FOR_{ARCHS,OPSYS}. (For now, until
all pkgs are converted, provide backwards compatibility.) *Both* may
be defined, in which case NOT_FOR_PLATFORM takes precedence.
- Also do some significant aesthetic cleanup, based on the idea
`define platform-specific overrides first, then define a generic case
with the ?= operator'. Lots more of this to do yet.
1999-05-24 20:42:00 +02:00
|
|
|
# Preload all default values for CFLAGS, LDFLAGS, etc. before bsd.pkg.mk
|
|
|
|
# or a pkg Makefile modifies them.
|
1999-05-24 13:17:05 +02:00
|
|
|
.include <sys.mk>
|
|
|
|
|
2000-10-15 13:31:41 +02:00
|
|
|
# Check if we got Mesa distributed with XFree86 4.x or if we need to
|
|
|
|
# depend on the Mesa package.
|
|
|
|
.if (defined(CHECK_MESA) || defined(USE_MESA))
|
|
|
|
X11BASE?= /usr/X11R6
|
|
|
|
.if exists(${X11BASE}/include/GL/glx.h)
|
|
|
|
__BUILTIN_MESA!= egrep -c BuildGLXLibrary ${X11BASE}/lib/X11/config/X11.tmpl || true
|
|
|
|
.else
|
|
|
|
__BUILTIN_MESA= 0
|
|
|
|
.endif
|
|
|
|
.if ${__BUILTIN_MESA} == "0"
|
|
|
|
HAVE_BUILTIN_MESA= NO
|
|
|
|
.else
|
|
|
|
HAVE_BUILTIN_MESA= YES
|
1999-05-24 00:10:01 +02:00
|
|
|
.endif
|
2000-10-15 13:31:41 +02:00
|
|
|
.undef __BUILTIN_MESA
|
|
|
|
.endif # CHECK_MESA
|
|
|
|
|
2000-11-02 04:01:40 +01:00
|
|
|
.if defined(USE_CURSES) && !defined(NEED_NCURSES)
|
|
|
|
NEED_NCURSES= NO
|
|
|
|
.if ${OPSYS} == "NetBSD"
|
|
|
|
_INCOMPAT_CURSES= 0.* 1.[0123]* 1.4.* 1.4[A-X]
|
|
|
|
.for PATTERN in ${_INCOMPAT_CURSES}
|
|
|
|
.if ${OS_VERSION:M${PATTERN}} != ""
|
|
|
|
NEED_NCURSES= YES
|
|
|
|
.endif
|
|
|
|
.endfor
|
|
|
|
.endif
|
2000-11-21 01:16:43 +01:00
|
|
|
# we can NOT pass the NEED_NCURSES flag down as every required package
|
|
|
|
# will start to require ncurses, which is not true (and raises some
|
|
|
|
# recursive dependency problems!)
|
2000-11-02 04:01:40 +01:00
|
|
|
.endif # USE_CURSES
|
|
|
|
|
2001-03-19 15:46:04 +01:00
|
|
|
|
|
|
|
#
|
|
|
|
# list of serial port devices commonly found on various machines and
|
|
|
|
# which is the common default one. This is used for semi-reasonable
|
|
|
|
# defaults on different machines. These can and should be overridden
|
|
|
|
# on your machine in /etc/mk.conf.
|
|
|
|
# Please help fill in the list.
|
|
|
|
.if (${OPSYS} == "NetBSD")
|
|
|
|
.if (${MACHINE_ARCH} == alpha)
|
|
|
|
DEFAULT_SERIAL_DEVICE?= /dev/ttyC0
|
|
|
|
SERIAL_DEVICES?= /dev/ttyC0 \
|
|
|
|
/dev/ttyC1
|
|
|
|
.elif (${MACHINE_ARCH} == "i386")
|
|
|
|
DEFAULT_SERIAL_DEVICE?= /dev/tty00
|
|
|
|
SERIAL_DEVICES?= /dev/tty00 \
|
|
|
|
/dev/tty01
|
|
|
|
.elif (${MACHINE_ARCH} == m68k)
|
|
|
|
DEFAULT_SERIAL_DEVICE?= /dev/tty00
|
|
|
|
SERIAL_DEVICES?= /dev/tty00 \
|
|
|
|
/dev/tty01
|
|
|
|
.elif (${MACHINE_ARCH} == mipsel)
|
|
|
|
DEFAULT_SERIAL_DEVICE?= /dev/ttyC0
|
|
|
|
SERIAL_DEVICES?= /dev/ttyC0 \
|
|
|
|
/dev/ttyC1
|
|
|
|
.elif (${MACHINE_ARCH} == "sparc")
|
|
|
|
DEFAULT_SERIAL_DEVICE?= /dev/ttya
|
|
|
|
SERIAL_DEVICES?= /dev/ttya \
|
|
|
|
/dev/ttyb
|
|
|
|
.else
|
|
|
|
DEFAULT_SERIAL_DEVICE?= /dev/null
|
|
|
|
SERIAL_DEVICES?= /dev/null
|
|
|
|
.endif # ${MACHINE_ARCH}
|
|
|
|
.else # ${OPSYS} != "NetBSD"
|
|
|
|
DEFAULT_SERIAL_DEVICE?= /dev/null
|
|
|
|
SERIAL_DEVICES?= /dev/null
|
|
|
|
.endif # ${OPSYS} == "NetBSD"
|
|
|
|
|
2001-03-06 15:50:45 +01:00
|
|
|
##### Some overrides of defaults below on a per-OS basis.
|
|
|
|
.if (${OPSYS} == "NetBSD")
|
|
|
|
LOCALBASE?= ${DESTDIR}/usr/pkg
|
2001-03-06 17:00:15 +01:00
|
|
|
PKG_TOOLS_BIN?= /usr/sbin
|
2001-03-06 15:50:45 +01:00
|
|
|
.elif (${OPSYS} == "SunOS")
|
|
|
|
X11BASE?= ${DESTDIR}/usr/openwin
|
2001-03-06 17:00:15 +01:00
|
|
|
PKG_TOOLS_BIN?= ${LOCALBASE}/bsd/bin
|
2001-03-10 11:53:15 +01:00
|
|
|
.elif (${OPSYS} == "Linux")
|
2001-03-06 17:00:15 +01:00
|
|
|
PKG_TOOLS_BIN?= ${LOCALBASE}/bsd/bin
|
2001-03-06 15:50:45 +01:00
|
|
|
.endif
|
|
|
|
|
|
|
|
LOCALBASE?= ${DESTDIR}/usr/local
|
|
|
|
X11BASE?= ${DESTDIR}/usr/X11R6
|
|
|
|
CROSSBASE?= ${LOCALBASE}/cross
|
2001-03-13 10:53:37 +01:00
|
|
|
|
2001-03-06 15:50:45 +01:00
|
|
|
.ifndef DIGEST
|
|
|
|
DIGEST:= ${LOCALBASE}/bin/digest
|
|
|
|
MAKEFLAGS+= DIGEST=${DIGEST}
|
|
|
|
.endif
|
|
|
|
|
2001-03-13 10:53:37 +01:00
|
|
|
# Only add the DIGEST_VERSION value to MAKEFLAGS when we know
|
|
|
|
# we've got a valid version number, retrieved from the digest(1)
|
|
|
|
# binary. This is different to PKGTOOLS_VERSION, since, in that
|
|
|
|
# case, the build dies when pkg_info(1) is out of date.
|
|
|
|
|
2001-03-13 10:41:36 +01:00
|
|
|
.if !exists(${DIGEST})
|
|
|
|
DIGEST_VERSION= 20010301
|
|
|
|
.elif !defined(DIGEST_VERSION)
|
|
|
|
DIGEST_VERSION!= ${DIGEST} -V 2>/dev/null
|
2001-03-06 15:50:45 +01:00
|
|
|
MAKEFLAGS+= DIGEST_VERSION="${DIGEST_VERSION}"
|
|
|
|
.endif
|
|
|
|
|
2001-03-06 17:00:15 +01:00
|
|
|
.ifndef PKGTOOLS_VERSION
|
|
|
|
PKGTOOLS_VERSION!=${PKG_TOOLS_BIN}/pkg_info -V 2>/dev/null || echo 20010302
|
|
|
|
MAKEFLAGS+= PKGTOOLS_VERSION="${PKGTOOLS_VERSION}"
|
|
|
|
.endif
|
|
|
|
|
2001-03-24 22:06:52 +01:00
|
|
|
.if (${OPSYS} == SunOS) && !defined(ZOULARIS_VERSION)
|
2001-03-23 16:47:21 +01:00
|
|
|
.if !exists(${LOCALBASE}/bsd/share/mk/zoularis.mk)
|
|
|
|
ZOULARIS_VERSION= 20000522
|
|
|
|
.else
|
|
|
|
.include "${LOCALBASE}/bsd/share/mk/zoularis.mk"
|
|
|
|
.endif
|
|
|
|
MAKEFLAGS+= ZOULARIS_VERSION="${ZOULARIS_VERSION}"
|
|
|
|
.endif
|
|
|
|
|
2000-10-15 13:31:41 +02:00
|
|
|
.endif # BSD_PKG_MK
|