waf

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

wscript (1147B)


      1 #! /usr/bin/env python
      2 # encoding: utf-8
      3 # Thomas Nagy, 2010 (ita)
      4 
      5 FRAG = '''
      6 namespace Moo {
      7 	public class Test {
      8 		public static int Main(string[] args) {
      9 			return 0;
     10 		}
     11 	}
     12 }
     13 '''
     14 
     15 def options(opt):
     16 	opt.load('cs')
     17 
     18 def configure(conf):
     19 	conf.load('cs')
     20 	try:
     21 		conf.check(features='cs', fragment=FRAG, compile_filename='test.cs', gen='test.exe',
     22 			csflags=['-pkg:gtk-sharp-2.0'], msg='Checking for Gtksharp support')
     23 		conf.env.HAS_GTKSHARP = True
     24 	except conf.errors.ConfigurationError:
     25 		conf.env.HAS_GTKSHARP = False
     26 
     27 def build(bld):
     28 
     29 	# for system libraries, use:
     30 	#bld.read_csshlib('ManagedLibrary.dll', paths=[bld.env.mylibrarypath])
     31 
     32 	bld(features='cs', source='My.cs Dye.cs', gen='my.dll', name='mylib', csdebug='full')
     33 	bld(features='cs', source='Hi.cs', includes='.', gen='hi.exe', use='mylib', name='hi')
     34 	bld(features='cs', source='Hi.cs', includes='.', gen='hi-x86.exe', use='mylib', name='hi', platform='x86')
     35 	if bld.env.HAS_GTKSHARP:
     36 		bld(features='cs', source='Simple.cs', includes='.', gen='mono-hello.exe', csflags=['-pkg:gtk-sharp-2.0'])
     37 
     38 	# note:
     39 	# bld(features='cs', ..., type='module' # or exe, library, winexe, ...