waf

FORK: waf with some random patches
git clone https://git.neptards.moe/neptards/waf.git
Log | Files | Refs | README

wscript (715B)


      1 #! /usr/bin/env python
      2 # encoding: utf-8
      3 # Thomas Nagy, 2010 (ita)
      4 
      5 VERSION='0.0.1'
      6 APPNAME='cc_test'
      7 
      8 """
      9 """
     10 
     11 from waflib import Utils, Build
     12 
     13 top = '.'
     14 
     15 def options(opt):
     16 	opt.load('compiler_c')
     17 
     18 def configure(conf):
     19 	conf.load('compiler_c')
     20 
     21 def read_files(task):
     22 	# the real build files must be excluded, else they will get rebuilt
     23 	for x in task.generator.bld.bldnode.ant_glob('**', excl='**/*.o app', remove=False):
     24 		pass
     25 
     26 def build(bld):
     27 	bld.post_mode = Build.POST_LAZY
     28 
     29 	bld(rule='tar xvf ${SRC[0].abspath()}', source='foo.tar')
     30 	bld.add_group('foo')
     31 	bld(rule=read_files, always=True, name='read_files')
     32 	bld.add_group('bar')
     33 	bld.program(source='aa/main.c', target='app')
     34 
     35 
     36 	print bld.get_group('bar')