Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 42620103d8ee8a2d972d3103bad0ab73 > files > 199

waf-1.5.19-1.fc14.noarch.rpm

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

import sys, os

VERSION='0.0.1'
APPNAME='perl_test'

top = '.'
out = 'build'

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

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

	# check for perl
	conf.check_perl_version((5,6,0))

	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(
		features = 'cc cshlib perlext',
		source = 'Mytest.xs',
		target = 'Mytest',
		install_path = '${ARCHDIR_PERL}/auto')

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