move the architecture *constants* to a private arch-defines.mk file
That way, bsd.port.arch.mk can still make available in a Makefile, but we can also include them early in bsd.port.mk, so that they will always be available from modules and Makefile.inc.
This commit is contained in:
parent
ae900f0d39
commit
ab6b512da4
38
infrastructure/mk/arch-defines.mk
Normal file
38
infrastructure/mk/arch-defines.mk
Normal file
@ -0,0 +1,38 @@
|
||||
# $OpenBSD: arch-defines.mk,v 1.1 2011/12/08 08:15:36 espie Exp $
|
||||
#
|
||||
# ex:ts=4 sw=4 filetype=make:
|
||||
#
|
||||
# derived from bsd.port.mk in 2011
|
||||
# This file is in the public domain.
|
||||
# It is actually a part of bsd.port.mk that won't be included manually.
|
||||
#
|
||||
|
||||
# architecture constants
|
||||
|
||||
ARCH ?!= uname -m
|
||||
|
||||
ALL_ARCHS = alpha amd64 arm armish arm hppa hppa64 i386 landisk \
|
||||
loongson luna88k m68k m88k mac68k macppc mips64 mips64el \
|
||||
mvme68k mvme88k palm sgi socppc sparc sparc64 vax zaurus
|
||||
# not all powerpc have apm(4), hence the use of macppc
|
||||
APM_ARCHS = amd64 arm i386 loongson macppc sparc sparc64
|
||||
LP64_ARCHS = alpha amd64 hppa64 sparc64 mips64 mips64el
|
||||
NO_SHARED_ARCHS = m88k vax
|
||||
GCC4_ARCHS = alpha amd64 arm armish beagle gumstix i386 hppa hppa64 \
|
||||
loongson macppc mips64 \
|
||||
mips64el mvmeppc palm powerpc sgi socppc sparc sparc64 zaurus
|
||||
GCC3_ARCHS = landisk sh
|
||||
GCC2_ARCHS = aviion luna88k m68k m88k mac68k mvme68k mvme88k vax
|
||||
# XXX easier for ports that depend on mono
|
||||
MONO_ARCHS = amd64 i386
|
||||
|
||||
.for PROP in ALL APM LP64 NO_SHARED GCC4 GCC3 GCC2 MONO
|
||||
. for A B in ${MACHINE_ARCH} ${ARCH}
|
||||
. if !empty(${PROP}_ARCHS:M$A) || !empty(${PROP}_ARCHS:M$B)
|
||||
PROPERTIES += ${PROP:L}
|
||||
. endif
|
||||
. endfor
|
||||
.endfor
|
||||
.if ${ELF_TOOLCHAIN:L} == "yes"
|
||||
PROPERTIES += elf
|
||||
.endif
|
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: bsd.port.arch.mk,v 1.9 2011/11/29 15:11:18 naddy Exp $
|
||||
# $OpenBSD: bsd.port.arch.mk,v 1.10 2011/12/08 08:15:36 espie Exp $
|
||||
#
|
||||
# ex:ts=4 sw=4 filetype=make:
|
||||
#
|
||||
@ -10,6 +10,11 @@
|
||||
# _guard against multiple inclusion for bsd.port.mk
|
||||
_BSD_PORT_ARCH_MK_INCLUDED = Done
|
||||
|
||||
.if !defined(_ARCH_DEFINES_INCLUDED)
|
||||
_ARCH_DEFINES_INCLUDED = Done
|
||||
. include "${PORTSDIR}/infrastructure/mk/arch-defines.mk"
|
||||
.endif
|
||||
|
||||
# early include of Makefile.inc
|
||||
.if !defined(_MAKEFILE_INC_DONE)
|
||||
. if exists(${.CURDIR}/../Makefile.inc)
|
||||
@ -18,25 +23,6 @@ _MAKEFILE_INC_DONE = Yes
|
||||
. endif
|
||||
.endif
|
||||
|
||||
# architecture stuff
|
||||
|
||||
ARCH ?!= uname -m
|
||||
|
||||
ALL_ARCHS = alpha amd64 arm armish arm hppa hppa64 i386 landisk \
|
||||
loongson luna88k m68k m88k mac68k macppc mips64 mips64el \
|
||||
mvme68k mvme88k palm sgi socppc sparc sparc64 vax zaurus
|
||||
# not all powerpc have apm(4), hence the use of macppc
|
||||
APM_ARCHS = amd64 arm i386 loongson macppc sparc sparc64
|
||||
LP64_ARCHS = alpha amd64 hppa64 sparc64 mips64 mips64el
|
||||
NO_SHARED_ARCHS = m88k vax
|
||||
GCC4_ARCHS = alpha amd64 arm armish beagle gumstix i386 hppa hppa64 \
|
||||
loongson macppc mips64 \
|
||||
mips64el mvmeppc palm powerpc sgi socppc sparc sparc64 zaurus
|
||||
GCC3_ARCHS = landisk sh
|
||||
GCC2_ARCHS = aviion luna88k m68k m88k mac68k mvme68k mvme88k vax
|
||||
# XXX easier for ports that depend on mono
|
||||
MONO_ARCHS = amd64 i386
|
||||
|
||||
# Set NO_SHARED_LIBS for those machines that don't support shared libraries.
|
||||
.for _m in ${MACHINE_ARCH}
|
||||
. if !empty(NO_SHARED_ARCHS:M${_m})
|
||||
@ -112,16 +98,6 @@ IGNORE${_s} += "is not for ${NOT_FOR_ARCHS${_s}}"
|
||||
. endfor
|
||||
. endif
|
||||
|
||||
.for PROP in ALL APM LP64 NO_SHARED GCC4 GCC3 GCC2 MONO
|
||||
. for A B in ${MACHINE_ARCH} ${ARCH}
|
||||
. if !empty(${PROP}_ARCHS:M$A) || !empty(${PROP}_ARCHS:M$B)
|
||||
PROPERTIES += ${PROP:L}
|
||||
. endif
|
||||
. endfor
|
||||
.endfor
|
||||
.if ${ELF_TOOLCHAIN:L} == "yes"
|
||||
PROPERTIES += elf
|
||||
.endif
|
||||
|
||||
# allow subpackages to vanish on architectures that don't
|
||||
# support them
|
||||
|
@ -1,6 +1,6 @@
|
||||
#-*- mode: Makefile; tab-width: 4; -*-
|
||||
# ex:ts=4 sw=4 filetype=make:
|
||||
# $OpenBSD: bsd.port.mk,v 1.1149 2011/12/02 15:14:20 espie Exp $
|
||||
# $OpenBSD: bsd.port.mk,v 1.1150 2011/12/08 08:15:36 espie Exp $
|
||||
# $FreeBSD: bsd.port.mk,v 1.264 1996/12/25 02:27:44 imp Exp $
|
||||
# $NetBSD: bsd.port.mk,v 1.62 1998/04/09 12:47:02 hubertf Exp $
|
||||
#
|
||||
@ -169,6 +169,11 @@ _PKG_ADD = ${PKG_ADD} ${_PROGRESS}
|
||||
_PKG_CREATE = ${PKG_CREATE} ${_PROGRESS}
|
||||
_PKG_DELETE = ${PKG_DELETE} ${_PROGRESS}
|
||||
|
||||
.if !defined(_ARCH_DEFINES_INCLUDED)
|
||||
_ARCH_DEFINES_INCLUDED = Done
|
||||
. include "${PORTSDIR}/infrastructure/mk/arch-defines.mk"
|
||||
.endif
|
||||
|
||||
.if !defined(_MAKEFILE_INC_DONE)
|
||||
. if exists(${.CURDIR}/../Makefile.inc)
|
||||
_MAKEFILE_INC_DONE = Yes
|
||||
|
Loading…
Reference in New Issue
Block a user