Example #1
0
    def build_object(self, target_name, out_filename, in_filename,
                     include_dirs, compiler_flags):
        ui.debug("building object " + out_filename)

        with ui.ident:
            prerequisites = self.__fetch_includes(target_name, in_filename,
                                                  include_dirs, compiler_flags)
            prerequisites.append(in_filename)

            ui.debug("appending prerequisites from pake modules: {!s}".format(
                fsutils.pake_files))

            prerequisites.extend(fsutils.pake_files)

            ui.debug("prerequisites: {!r}".format(prerequisites))

            if fsutils.is_any_newer_than(prerequisites, out_filename):
                fsutils.mkdir_recursive(os.path.dirname(out_filename))

                cmd = configurations.compiler(
                ) + " " + self.__prepare_compiler_flags(
                    include_dirs, compiler_flags
                ) + " -c -o " + out_filename + " " + in_filename
                if command_line.args.verbose:
                    ui.step(configurations.compiler(), cmd)
                else:
                    ui.step(configurations.compiler(), in_filename)

                shell.execute(cmd)
Example #2
0
    def build_object(self, target_name, out_filename, in_filename, include_dirs,
                     compiler_flags):

        abs_source = os.path.join(os.getcwd(), in_filename)

        ui.debug("building object " + out_filename)

        with ui.ident:
            prerequisites = self.__fetch_includes(target_name, abs_source,
                                                  include_dirs, compiler_flags)
            prerequisites.append(in_filename)

            ui.debug("appending prerequisites from pake modules: {!s}"
                     .format(fsutils.pake_files))

            prerequisites.extend(fsutils.pake_files)

            ui.debug("prerequisites: {!r}".format(prerequisites))

            if fsutils.is_any_newer_than(prerequisites, out_filename):
                fsutils.mkdir_recursive(os.path.dirname(out_filename));

                cmd = configurations.compiler() + " " + self.__prepare_compiler_flags(include_dirs, compiler_flags) + " -c -o " + out_filename + " " + abs_source
                if command_line.args.verbose:
                    ui.step(configurations.compiler(), cmd)
                else:
                    ui.step(configurations.compiler(), in_filename)

                shell.execute(cmd)
Example #3
0
    def copy_resources(self, toolchain):
        root_dir = os.getcwd()
        os.chdir(self.common_parameters.root_path)

        for resource in self.common_parameters.resources.eval():
            ui.step("copy", resource)
            shell.execute("rsync --update -r '{resource}' '{build_dir}/'"
                          .format(resource=resource,
                                  build_dir=toolchain.build_dir()))

        os.chdir(root_dir)
Example #4
0
    def copy_resources(self, toolchain):
        root_dir = os.getcwd()
        os.chdir(self.common_parameters.root_path)

        for resource in self.common_parameters.resources.eval():
            ui.step("copy", resource)
            shell.execute(
                "rsync --update -r '{resource}' '{build_dir}/'".format(
                    resource=resource, build_dir=toolchain.build_dir()))

        os.chdir(root_dir)
Example #5
0
            print "eagle eye:       prints all room adjacencies"

    elif (var[:4].lower() == 'save'):
        ui.save(current)

    elif (var[:4].lower() == 'load'):
        current = castle.find_room(ui.load().name)

    elif (var[:4].lower() == 'look'):
        ui.look(current, var[5:])

    elif (var[:4].lower() == 'open'):
        ui.open_(current, var[5:])

    elif (var[:4].lower() == 'step'):
        current = ui.step(current, var[5:])

    elif (var[:4].lower() == 'move'):
        current = ui.move(current, var[5:])

    elif (var[:5].lower() == 'throw'):
        castle.throw_npc_exception(current, True)

    elif (var[:4].lower() == 'info'):
        ui.info()

    elif (var[:4].lower() == 'wave' or var[:7].lower() == 'shuffle'):
        ui.wave()

    elif (var[:5].lower() == 'hault'):
        ui.hault(var[6:])