Ejemplo n.º 1
0
    with open(join(dirname(__file__), "Doxyfile")) as doxyfile:
        proc = subprocess.Popen(["doxygen", "-"], stdin=subprocess.PIPE)
        proc.stdin.write(doxyfile.read())
        proc.stdin.write("OUTPUT_DIRECTORY={}\n".format(output_dir))
        proc.stdin.write("INPUT={}".format(" ".join(dirs)))
        proc.stdin.close()
        proc.wait()

EXCLUDES = ["targets", "features/FEATURE", "features/mbedtls",
           "features/nanostack", "features/storage"]

def is_not_excluded(src):
    return all(exclude not in src for exclude in EXCLUDES)

if __name__ == "__main__":
    import sys
    from os.path import abspath, dirname, join
    # Be sure that the tools directory is in the search path
    ROOT = abspath(join(dirname(__file__), "..", ".."))
    sys.path.insert(0, ROOT)

    from tools.toolchains.gcc import GCC_ARM
    from tools.targets import TARGET_MAP
    toolchain = GCC_ARM(TARGET_MAP["Super_Target"])
    resources = toolchain.scan_resources(".")
    generate_documentation(filter(is_not_excluded,
                                  sum(map(lambda x:x.headers,
                                          resources.features.values()),
                                      resources.headers)),
                           join(dirname(dirname(__file__)), "mbed-docs"))
Ejemplo n.º 2
0
from os import walk
from os.path import join, abspath, dirname, basename, splitext
import sys

ROOT = abspath(join(dirname(__file__), "..", ".."))
sys.path.insert(0, ROOT)

from tools.toolchains.gcc import GCC_ARM
from tools.targets import TARGET_MAP
from argparse import ArgumentParser

if __name__ == "__main__":
    parser = ArgumentParser(
        "Find duplicate file names within a directory structure")
    parser.add_argument("dirs",
                        help="Directories to search for duplicate file names",
                        nargs="*")
    parser.add_argument(
        "--silent",
        help="Supress printing of filenames, just return number of duplicates",
        action="store_true")
    args = parser.parse_args()

    toolchain = GCC_ARM(TARGET_MAP["K64F"])

    resources = sum([toolchain.scan_resources(d) for d in args.dirs], None)

    scanned_files = {}

    exit(resources.detect_duplicates(toolchain))
Ejemplo n.º 3
0
from os import walk
from os.path import join, abspath, dirname, basename, splitext
import sys

ROOT = abspath(join(dirname(__file__), "..", ".."))
sys.path.insert(0, ROOT)

from tools.toolchains.gcc import GCC_ARM
from tools.targets import TARGET_MAP
from argparse import ArgumentParser

if __name__ == "__main__":
    parser = ArgumentParser("Find duplicate file names within a directory structure")
    parser.add_argument("dirs", help="Directories to search for duplicate file names"
                        , nargs="*")
    parser.add_argument("--silent", help="Supress printing of filenames, just return number of duplicates", action="store_true")
    args = parser.parse_args()

    toolchain = GCC_ARM(TARGET_MAP["K64F"])

    resources = sum([toolchain.scan_resources(d) for d in args.dirs], None)

    scanned_files = {}

    exit(resources.detect_duplicates(toolchain))

Ejemplo n.º 4
0
        proc.wait()


EXCLUDES = [
    "targets", "features/FEATURE", "features/mbedtls", "features/nanostack",
    "features/storage"
]


def is_not_excluded(src):
    return all(exclude not in src for exclude in EXCLUDES)


if __name__ == "__main__":
    import sys
    from os.path import abspath, dirname, join
    # Be sure that the tools directory is in the search path
    ROOT = abspath(join(dirname(__file__), "..", ".."))
    sys.path.insert(0, ROOT)

    from tools.toolchains.gcc import GCC_ARM
    from tools.targets import TARGET_MAP
    toolchain = GCC_ARM(TARGET_MAP["Super_Target"])
    resources = toolchain.scan_resources(".")
    generate_documentation(
        filter(
            is_not_excluded,
            sum(map(lambda x: x.headers, resources.features.values()),
                resources.headers)),
        join(dirname(dirname(__file__)), "mbed-docs"))