예제 #1
0
    def execute(self):
        self._prepare()
        artifact_name = self._get_artifact_name()

        rel = BuildContext()
        rel.variant = 'release' 
        rel.execute()

        deb = BuildContext()
        deb.variant = 'debug'
        deb.execute()

        rel_artifact = rel.path.find_resource(artifact_name)
        deb_artifact = deb.path.find_resource(artifact_name)

        dist_name = 'fundament-%s-%s.tar.gz' % (self.env.DEST_OS, 
            Context.g_module.VERSION)

        dist_path = '%s/%s' % (self.out_dir, dist_name)

        p = pathlib.Path(dist_path) 
        if p.exists():
            p.unlink()

        rel_target = 'bin/%s/release/%s' % (self.env.DEST_OS, artifact_name)
        deb_target = 'bin/%s/debug/%s' % (self.env.DEST_OS, artifact_name)
        tar = tarfile.open(name=dist_path, mode='x:gz')
        tar.add(str(rel_artifact), arcname=rel_target)
        tar.add(str(deb_artifact), arcname=deb_target)  
        tar.add('lib/c/public/', arcname='public')
        tar.add('tools/FundamentConfig.cmake', arcname='FundamentConfig.cmake')
        tar.close()
예제 #2
0
    def register_tasks(bld: BuildContext, inputs: List[Nod3], group="CSV2RDF"):
        if group not in bld.groups:
            bld.add_group(group)

        for f in inputs:
            task = Csv2RdfTask(Csv2RdfTask, "csv2rdf", bld.env.derive())
            task.set_inputs(f)
            task.set_outputs(f.change_ext(".ttl"))
            bld.add_to_group(task, group=group)
예제 #3
0
def apidoc(ctx):
    """generate API reference documentation"""
    ctx = BuildContext()  # create our own context to have ctx.top_dir
    basedir = ctx.top_dir
    doxygen = _find_program(ctx, 'doxygen')
    doxyfile = '%s/doc/Doxyfile' % ctx.out_dir
    Logs.pprint('CYAN', 'Generating API documentation')
    ret = ctx.exec_command('%s %s' % (doxygen, doxyfile))
    if ret != 0:
        raise WafError('Generating API documentation failed')
예제 #4
0
    def register_tasks(bld: BuildContext,
                       inputs: List[Nod3],
                       group="csv-lint"):
        if group not in bld.groups:
            bld.add_group(group)

        for f in inputs:
            task = CsvLintTask(CsvLintTask, "csv-lint", bld.env.derive())
            task.set_inputs(f)
            bld.add_to_group(task, group=group)
예제 #5
0
def hackingdoc(ctx):
    """generate HACKING documentation"""
    ctx = BuildContext()  # create our own context to have ctx.top_dir
    Logs.pprint('CYAN', 'Generating HACKING documentation')
    cmd = _find_rst2html(ctx)
    hacking_file = os.path.join(ctx.top_dir, 'HACKING')
    hacking_html_file = os.path.join(ctx.top_dir, 'doc', 'hacking.html')
    stylesheet = os.path.join(ctx.top_dir, 'doc', 'geany.css')
    ret = ctx.exec_command('%s  -stg --stylesheet=%s %s %s' % (
        cmd, stylesheet, hacking_file, hacking_html_file))
    if ret != 0:
        raise WafError('Generating HACKING documentation failed')
예제 #6
0
파일: remote.py 프로젝트: JodyGoldberg/waf
	def execute(self):
		global is_remote
		if not is_remote:
			self.skip_unbuildable_variant()
		else:
			BuildContext.execute(self)
예제 #7
0
파일: remote.py 프로젝트: afeldman/waf
 def execute(self):
     global is_remote
     if not is_remote:
         self.skip_unbuildable_variant()
     else:
         BuildContext.execute(self)