Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 2053a0d9eaaf755b990f80ce4df504a7 > files > 268

waf-1.5.9-1mdv2010.0.noarch.rpm

#! /usr/bin/env python
# encoding: utf-8
# anonymous coward, 2007

import sys, os

# the following two variables are used by the target "waf dist"
VERSION='0.0.1'
APPNAME='perl_test'

# these variables are mandatory ('/' are converted automatically)
srcdir = '.'
blddir = 'build'

def set_options(opt):
	opt.tool_options('perl')
	opt.tool_options('compiler_cc')

def configure(conf):
	conf.check_tool('compiler_cc')
	conf.check_tool('perl')

	# check for perl
	if not conf.check_perl_version((5,6,0)):
		return False

	conf.check_perl_ext_devel()

	# check for some perl module...
	conf.check_perl_module('Cairo')
	# ...and a specific version
	conf.check_perl_module('Devel::PPPort 4.89')

def build(bld):

	# Build a perl extension module
	obj = bld.new_task_gen(
		features = 'cc cshlib perlext',
		source = 'Mytest.xs',
		target = 'Mytest',
		install_path = '${ARCHDIR_PERL}/auto')

	bld.install_files('${ARCHDIR_PERL}', 'Mytest.pm')