2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-22 01:46:15 +01:00
This commit is contained in:
Thomas Nagy 2016-11-08 21:29:46 +01:00
parent 8bea637dc7
commit 0454ee677e
No known key found for this signature in database
GPG Key ID: 49B4C67C05277AAA
2 changed files with 35 additions and 0 deletions

8
TODO
View File

@ -3,3 +3,11 @@ Waf 1.9
Documentation Documentation
Waf 2.0
-------
Merge mem_reducer.py in the mainline
Keep sorted lists in TaskGen.prec[]
Improve the sorting in TaskGen.post()
Default to force files into the build directory

View File

@ -0,0 +1,27 @@
#!/usr/bin/env python
# coding=utf-8
# Thomas Nagy, 2016
"""
Force all build files to go to the build directory:
def options(opt):
opt.load('force_build_directory')
"""
from waflib import Node, Utils
def find_or_declare(self, lst):
if isinstance(lst, str):
lst = [x for x in Utils.split_path(lst) if x and x != '.']
node = self.get_bld().search_node(lst)
if node:
if not os.path.isfile(node.abspath()):
node.parent.mkdir()
return node
node = self.get_bld().make_node(lst)
node.parent.mkdir()
return node
Node.Node.find_or_declare = find_or_declare