c_osx

MacOSX related tools

waflib.Tools.c_osx.app_info

plist template

waflib.Tools.c_osx.set_macosx_deployment_target(self)[source]

Task generator method

see WAF issue 285 and also and also http://trac.macports.org/ticket/17059

Feature :c, cxx
waflib.Tools.c_osx.create_bundle_dirs(self, name, out)[source]

Task generator method

Create bundle folders, used by create_task_macplist() and create_task_macapp()

waflib.Tools.c_osx.create_task_macapp(self)[source]

Task generator method

To compile an executable into a Mac application (a .app), set its mac_app attribute:

def build(bld):
        bld.shlib(source='a.c', target='foo', mac_app = True)

To force all executables to be transformed into Mac applications:

def build(bld):
        bld.env.MACAPP = True
        bld.shlib(source='a.c', target='foo')
Feature :cprogram, cxxprogram
waflib.Tools.c_osx.create_task_macplist(self)[source]

Task generator method

Create a waflib.Tools.c_osx.macplist instance.

Feature :cprogram, cxxprogram
waflib.Tools.c_osx.apply_bundle(self)[source]

Task generator method

To make a bundled shared library (a .bundle), set the mac_bundle attribute:

def build(bld):
        bld.shlib(source='a.c', target='foo', mac_bundle = True)

To force all executables to be transformed into bundles:

def build(bld):
        bld.env.MACBUNDLE = True
        bld.shlib(source='a.c', target='foo')
Feature :cshlib, cxxshlib
class waflib.Tools.c_osx.macapp(*k, **kw)[source]

Bases: waflib.Task.Task

Create mac applications

class waflib.Tools.c_osx.macplist(*k, **kw)[source]

Bases: waflib.Task.Task

Create plist files

waflib.Tools.c_osx.taskgen_method(func)

Decorator: register a method as a task generator method. The function must accept a task generator as first parameter:

from waflib.TaskGen import taskgen_method
@taskgen_method
def mymethod(self):
        pass
Parameters:func (function) – task generator method to add
Return type:function
waflib.Tools.c_osx.feature(*k)

Decorator: register a task generator method that will be executed when the object attribute ‘feature’ contains the corresponding key(s):

from waflib.Task import feature
@feature('myfeature')
def myfunction(self):
        print('that is my feature!')
def build(bld):
        bld(features='myfeature')
Parameters:k (list of string) – feature names
waflib.Tools.c_osx.before_method(*k)

Decorator: register a task generator method which will be executed before the functions of given name(s):

from waflib.TaskGen import feature, before
@feature('myfeature')
@before_method('fun2')
def fun1(self):
        print('feature 1!')
@feature('myfeature')
def fun2(self):
        print('feature 2!')
def build(bld):
        bld(features='myfeature')
Parameters:k (list of string) – method names
waflib.Tools.c_osx.after_method(*k)

Decorator: register a task generator method which will be executed after the functions of given name(s):

from waflib.TaskGen import feature, after
@feature('myfeature')
@after_method('fun2')
def fun1(self):
        print('feature 1!')
@feature('myfeature')
def fun2(self):
        print('feature 2!')
def build(bld):
        bld(features='myfeature')
Parameters:k (list of string) – method names

Features defined in this module:

Previous topic

c_config

Next topic

c_preproc

This Page