Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 42620103d8ee8a2d972d3103bad0ab73 > files > 238

waf-1.5.19-1.fc14.noarch.rpm

#! /usr/bin/env python

"""
This wscript demonstrates the use of bld.add_group to
schedule tasks into totally separate groups.

This is useful when building a compiler later used for building other things
See also: http://code.google.com/p/waf/wiki/TaskSystem
"""

top = '.'
out = 'out'

def set_options(opt):
	opt.tool_options('g++')

def configure(conf):
	conf.check_tool('g++')

def build(bld):

	# without the 'add_group' line, both a.cpp and c.cpp are compiled and
	# then both were linked at the same time
	# a.cpp is compiled and linked before c.cpp is even compiled

	bld(
		features = 'cxx cprogram',
		source = 'a.cpp',
		target = 'AA')

	bld.add_group('sep') # <- acts like a separator

	bld(
		features = 'cxx cprogram',
		source = 'c.cpp',
		target = 'CC')