waf

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

nobuild.py (419B)


      1 #! /usr/bin/env python
      2 # encoding: utf-8
      3 # Thomas Nagy, 2015 (ita)
      4 
      5 """
      6 Override the build commands to write empty files.
      7 This is useful for profiling and evaluating the Python overhead.
      8 
      9 To use::
     10 
     11     def build(bld):
     12         ...
     13         bld.load('nobuild')
     14 
     15 """
     16 
     17 from waflib import Task
     18 def build(bld):
     19 	def run(self):
     20 		for x in self.outputs:
     21 			x.write('')
     22 	for (name, cls) in Task.classes.items():
     23 		cls.run = run
     24