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

top = '.'
out = 'out'

import Scripting, Options

def configure(conf):
    conf.check_tool('gcc')

def build(bld):
	bld.install_files('/tmp/foo/', 'wscript')
	bld.new_task_gen(features='cc cprogram', target='foo', source='k.c')

# the default dist command packages source files for redistribution
# override the dist command to package build files (after they are installed into a temporary folder)
def dist(ctx):
	Scripting.commands.insert(0, 'package')
	Scripting.commands.insert(0, 'install')
	Options.options.destdir = '/tmp/foo'

def package(ctx):
	print("packaging")

