waf

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

wscript (1779B)


      1 #! /usr/bin/env python
      2 # encoding: utf-8
      3 # Federico Pellegrin 2017 (fedepell)
      4 
      5 """
      6 Example source tree to be used with eclipse extra. 
      7 
      8 First of all load the extra:
      9 
     10 ...
     11 def options(opt):
     12 	opt.load('eclipse')
     13 
     14 def configure(conf):
     15 	conf.load('eclipse')
     16 ...
     17 
     18 Then after configuring the project you can anytime run:
     19 
     20 waf eclipse
     21 
     22 This will generate the needed configuration files for Eclipse:
     23 -) .project is generic Eclipse project file
     24 -) .cproject for C/C++ CDT
     25 -) .classpath for Java JDT
     26 -) .pydevproject for Pydev
     27 
     28 If CDT is in the project (so at least one C/C++ build) then CDT builder
     29 will be used to call waf as it is more versatile. If just JDT/PYydev are
     30 used then an Eclipse external builder is defined that calls waf. This is
     31 created in the file .externalToolBuilders/Waf_Builder.launch.
     32 
     33 The example contains three directories with different supported languages
     34 to demonstrate the features working for each of them, most importantly the
     35 automatic addition of search paths for each language so referencing objects
     36 or files in the IDE is done correctly. This is equivalent to configure 
     37 Eclipse by hand using Project->Properties and then each language menu.
     38 
     39 Also the generic invocation for building and cleaning are redefined so
     40 waf is called correctly when the respective actions are requested.
     41 
     42 To test just the external builder definition just remove "c" from the
     43 module_list below.
     44 """
     45 
     46 
     47 module_list = 'c java python'
     48 out = 'build'
     49 
     50 def options(opt):
     51 	opt.load('eclipse')
     52 	# We recurse options in our submodules
     53 	opt.recurse(module_list)
     54 
     55 
     56 def configure(conf):
     57 	conf.env.ECLIPSE_EXTRA_TARGETS = ['test', 'lint', 'foo --bar']
     58 	conf.load('eclipse')
     59 	# We recurse configurations in our submodules
     60 	conf.recurse(module_list)
     61 
     62 
     63 def build(bld):
     64 	bld.recurse(module_list)
     65