#! /usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2008 (ita)

"""
Demonstrates how to enable totally implicit dependencies (from the scanners)

A .h is included by two .c but not by the third one
When running with -j2, the two .c will be compiled after the task producing the
header file has terminated. The header and the main.c compilation take place immediately

This may slow down the builds and might break some other usecases
"""

VERSION='0.0.1'
APPNAME='cc_test'
top = '.'
wscript = 'build'

import Task
Task.file_deps = Task.extract_deps

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

def build(bld):
	bld(
		target = 'beep.h',
		rule = 'echo \"#define bar 43\" > ${TGT}',
	)

	bld(
		features='cc cprogram',
		source='main.c foo.c bar.c',
		target='test',
		includes='.')

