BSD.PORT.ARCH.MK(5)

NAME
bsd.port.arch.mk - ports tree Makefile fragment, concerned with arch issues

SYNOPSIS

    # Set up such as
    MULTI_PACKAGES = -main -special
    ONLY_FOR_ARCHS-special = i386

.include <bsd.port.arch.mk>

    #some more lines such as
    .if ${BUILD_PACKAGES:M-special}
    CONFIGURE_ARGS += --enable-special
    .endif

.include <bsd.port.mk>

DESCRIPTION
bsd.port.arch.mk holds the logic used for arch-dependent builds in the ports tree. It is normally included as part of the larger bsd.port.mk(5), but it is also available separately for ports that require it. bsd.port.arch.mk assumes the following variables are already defined:
MULTI_PACKAGES
FLAVOR
FLAVORS
PSEUDO_FLAVORS
NOT_FOR_ARCHS-<sub>
ONLY_FOR_ARCHS-<sub>
and optionally, if the default won't be appropriate
NO_SHARED_LIBS
IGNORE-<sub>

It will set up the following variables for use in the rest of the Makefile:
ARCH
ALL_ARCHS
APM_ARCHS
COMPILER_VERSION
GCC2_ARCHS
GCC3_ARCHS
GCC4_ARCHS
LP64_ARCHS
NO_SHARED_ARCHS
NO_SHARED_LIBS
PROPERTIES
IGNORE-<sub>
BUILD_PACKAGES

Most importantly, BUILD_PACKAGES will be correctly set up, taking ONLY_FOR_ARCHS-<sub> and NOT_FOR_ARCHS-<sub> limitations into account, as well as pseudo-flavors.

Note that thanks to the way make(1) variables are evaluated, a setup such as

    ONLY_FOR_ARCHS-foo = ${LP64_ARCHS}

is perfectly admissible, since it will be used only after LP64_ARCHS is defined.

A more detailed description of each variable is available in bsd.port.mk(5).

All the constant values ARCH, ALL_ARCHS, COMPILER_VERION, GCC2_ARCHS, GCC3_ARCHS, GCC4_ARCHS, LP64_ARCHS, NO_SHARED_ARCHS and PROPERTIES are also available from MODULES and from ${.CURDIR}/../Makefile.inc. Note that due to historical accident, NO_SHARED_LIBS is not such a constant. Test PROPERTIES to assert whether a given platform supports shared libraries.

SEE ALSO
bsd.port.mk(5)

HISTORY
bsd.port.arch.mk was split from bsd.port.mk(5) in OpenBSD 5.1.