Name

mk_multiarch_do — Execute commands for multiple ISAs

Synopsis

MODULES="... platform ..."

mk_multiarch_do

Description

Executes a set of commands beginning with mk_multiarch_do and ending with mk_multiarch_done for each ISA of the host system. During the configure phase, this allows running tests or maniuplating variables for each ISA where the results might differ between them (e.g. pointer size, system library directory, library file extension). During the make phase, it allows building multiple versions of a binary for each ISA. On systems that use "fat" binaries, this function is a no-op during the make phase.

Examples

configure()
{
    mk_config_header "include/config.h"

    mk_multiarch_do
        mk_check_sizeofs HEADERDEPS="stdlib.h" "void*" "size_t"
        mk_define MY_LIB_DIR "\"$MK_LIBDIR/foobar\""
    mk_multiarch_done
}

make()
{
    mk_multiarch_do
        mk_library LIB="foobarclient" SOURCES="foobar.c"
    mk_multiarch_done
}