Sophie

Sophie

distrib > Mandriva > 2009.1 > x86_64 > media > contrib-backports > by-pkgid > 5449138d6297d4beefc46ffe46a8c51a > files > 304

waf-1.5.11-1mdv2009.1.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
"""

srcdir = '.'
blddir = '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')