# Path: workspace_tools/targets.py
# TARGET_MAP = {}


import sys
from time import time
from os.path import join, abspath, dirname
from optparse import OptionParser
from workspace_tools.build_api import build_mbed_libs
from workspace_tools.build_api import write_build_report
from workspace_tools.targets import TARGET_MAP
    failures = []
    successes = []
    skips = []
    build_report = []

    platforms = None
    if options.platforms != "":
        platforms = set(options.platforms.split(","))

    for target_name, toolchain_list in OFFICIAL_MBED_LIBRARY_BUILD:
        if platforms is not None and not target_name in platforms:
            print("Excluding %s from release" % target_name)
            continue

        if options.official_only:
            toolchains = (getattr(TARGET_MAP[target_name], 'default_toolchain', 'ARM'),)
        else:
            toolchains = toolchain_list

        if options.toolchains:
            print "Only building using the following toolchains: %s" % (options.toolchains)
            toolchainSet = set(toolchains)
            toolchains = toolchainSet and set((options.toolchains).split(','))


        cur_target_build_report = { "target": target_name, "passing": [], "failing": [], "skipped": []}

        for toolchain in toolchains:
            id = "%s::%s" % (target_name, toolchain)
            try:

# Path: workspace_tools/targets.py
# TARGET_MAP = {}


# Path: workspace_tools/build_release.py
import sys
from time import time
from os.path import join, abspath, dirname
from optparse import OptionParser
from workspace_tools.build_api import build_mbed_libs
from workspace_tools.build_api import write_build_report
from workspace_tools.targets import TARGET_MAP

    failures = []
    successes = []
    skips = []
    build_report = []

    platforms = None
    if options.platforms != "":
        platforms = set(options.platforms.split(","))

    for target_name, toolchain_list in OFFICIAL_MBED_LIBRARY_BUILD:
        if platforms is not None and not target_name in platforms:
            print("Excluding %s from release" % target_name)
            continue

        if options.official_only:
            toolchains = (getattr(TARGET_MAP[target_name], 'default_toolchain', 'ARM'),)
        else:
            toolchains = toolchain_list

        if options.toolchains:
            print "Only building using the following toolchains: %s" % (options.toolchains)
            toolchainSet = set(toolchains)
            toolchains = toolchainSet and set((options.toolchains).split(','))


        cur_target_build_report = { "target": target_name, "passing": [], "failing": [], "skipped": []}

        for toolchain in toolchains:
            id = "%s::%s" % (target_name, toolchain)
            try:

                built_mbed_lib = build_mbed_libs(TARGET_MAP[target_name], toolchain, verbose=options.verbose, jobs=options.jobs)