Example #1
0
 def writeTopLevel(self, build_file_path, output_path, xml_file):
     """Creates a build tool config makefile that executes archieve build."""
     config_name_list = []
     for config in self.configs:
         config_name_list.append(config['name'])
         if not os.path.exists(config['archives.dir']):
             os.makedirs(config['archives.dir'])
         
     writer = buildtools.get_writer(self.writerType, build_file_path)
     writer.writeTopLevel(config_name_list, self.spec_name, output_path, xml_file)
     writer.close()
Example #2
0
    def write(self, outputname):
        """Creates a build tool configuration file that executes archive build operations.

        The input to each archive build operation is an includefile that lists
        all the files to be included in the archive. These text files are
        generated before the build file by scanning the filesystem.
        """
        stages = buildtools.CommandList()

        commands = []
        if self.index > len(self.configs):
            raise Exception("index not found in configuration")
        config = self.configs[self.index]
        stages = self.manifest_to_commands(config, self.build_manifest(config))
                
        # merging the commands            
        while len(commands) < len(stages):
            commands.append([])
        for i in range(len(stages)):
            commands[i].extend(stages[i])

        writer = buildtools.get_writer(self.writerType, outputname)
        writer.write(self.create_command_list(commands))
        writer.close()