Ejemplo n.º 1
0
def install_uchroot(_):
    """Installer for erlent (contains uchroot)."""
    builddir = local.path(str(CFG["build_dir"].value))
    with local.cwd(builddir):
        erlent_src = local.path('erlent')
        erlent_git = erlent_src / '.git'
        erlent_repo = str(CFG['uchroot']['repo'])
        erlent_build = erlent_src / 'build'
        if not erlent_git.exists():
            git("clone", erlent_repo)
        else:
            with local.cwd(erlent_src):
                git("pull", "--rebase")

        erlent_build.mkdir()
        with local.cwd(erlent_build):
            cmake("../")
            make()

    os.environ["PATH"] = os.path.pathsep.join(
        [erlent_build, os.environ["PATH"]])
    local.env.update(PATH=os.environ["PATH"])

    if not find_package("uchroot"):
        LOG.error('uchroot not found, after updating PATH to %s',
                  os.environ['PATH'])
        sys.exit(-1)

    env = CFG['env'].value
    if 'PATH' not in env:
        env['PATH'] = []
    env['PATH'].append(str(erlent_build))
Ejemplo n.º 2
0
    def build(self):
        crocopat_dir = path.join(self.src_dir, "src")
        self.cflags += ["-I.", "-ansi"]
        self.ldflags += ["-L.", "-lrelbdd"]
        clang_cxx = cxx(self)

        with local.cwd(crocopat_dir):
            make("CXX=" + str(clang_cxx))
Ejemplo n.º 3
0
    def build(self):
        crocopat_dir = path.join(self.src_dir, "src")
        cflags = self.cflags + ["-I.", "-ansi"]
        ldflags = self.ldflags + ["-L.", "-lrelbdd"]
        clang_cxx = lt_clang_cxx(cflags, ldflags, self.compiler_extension)

        with local.cwd(crocopat_dir):
            make("CXX=" + str(clang_cxx))
Ejemplo n.º 4
0
    def build(self):
        clang = lt_clang(self.cflags, self.ldflags, self.compiler_extension)
        clang_cxx = lt_clang_cxx(self.cflags, self.ldflags,
                                 self.compiler_extension)

        with local.cwd(self.SRC_FILE):
            with local.env(CXX=str(clang_cxx), CC=str(clang)):
                make("clean")
                run(make["all", "-i"])
Ejemplo n.º 5
0
    def compile(self):
        self.download()

        clang = compiler.cc(self)
        clang_cxx = compiler.cxx(self)
        with local.cwd(self.src_file):
            with local.env(CXX=str(clang_cxx), CC=str(clang)):
                make("clean")
                run.run(make["all", "-i"])
Ejemplo n.º 6
0
    def compile(self):
        self.download()
        unzip(self.src_file)
        unpack_dir = "crocopat-{0}".format(self.version)

        crocopat_dir = local.path(unpack_dir) / "src"
        self.cflags += ["-I.", "-ansi"]
        self.ldflags += ["-L.", "-lrelbdd"]
        clang_cxx = compiler.cxx(self)

        with local.cwd(crocopat_dir):
            make("CXX=" + str(clang_cxx))
Ejemplo n.º 7
0
    def compile(self):
        self.download()
        unzip(self.src_file)
        unpack_dir = "crocopat-{0}".format(self.version)

        crocopat_dir = local.path(unpack_dir) / "src"
        self.cflags += ["-I.", "-ansi"]
        self.ldflags += ["-L.", "-lrelbdd"]
        clang_cxx = compiler.cxx(self)

        with local.cwd(crocopat_dir):
            make("CXX=" + str(clang_cxx))
Ejemplo n.º 8
0
def install_uchroot():
    from benchbuild.utils.cmd import git, mkdir
    builddir = settings.CFG["build_dir"].value()
    with local.cwd(builddir):
        if not os.path.exists("erlent/.git"):
            git("clone", settings.CFG["uchroot"]["repo"].value())
        else:
            with local.cwd("erlent"):
                git("pull", "--rebase")
        mkdir("-p", "erlent/build")
        with local.cwd("erlent/build"):
            from benchbuild.utils.cmd import cmake
            from benchbuild.utils.cmd import make
            cmake("../")
            make()
    erlent_path = os.path.abspath(os.path.join(builddir, "erlent", "build"))
    os.environ["PATH"] = os.path.pathsep.join(
        [erlent_path, os.environ["PATH"]])
    local.env.update(PATH=os.environ["PATH"])
    if not find_package("uchroot"):
        sys.exit(-1)
    settings.CFG["env"]["lookup_path"].value().append(erlent_path)