Skip to content

Commit

Permalink
Add BuildIf/SkipIf feature
Browse files Browse the repository at this point in the history
  • Loading branch information
menify committed Oct 18, 2015
1 parent e09e232 commit a4abac0
Show file tree
Hide file tree
Showing 7 changed files with 352 additions and 181 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*.py[cod]
*.prof
**/__pycache__/
**/.cache/
**/output/
**/build_output/
make/install
Expand Down
15 changes: 14 additions & 1 deletion aql/main/aql_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,8 @@ def __get_script_locals(self):
'Requires': self.requires,
'RequireModules': self.require_modules,
'Sync': self.sync_nodes,
'BuildIf': self.build_if,
'SkipIf': self.skip_if,
'Alias': self.alias_nodes,
'Default': self.default_build,
'AlwaysBuild': self.always_build,
Expand Down Expand Up @@ -852,12 +854,23 @@ def set_build_dir(self, build_dir):

# -----------------------------------------------------------

def build_if(self, condition, nodes):
self.build_manager.build_if(condition, nodes)

# -----------------------------------------------------------

def skip_if(self, condition, nodes):
self.build_manager.skip_if(condition, nodes)

# -----------------------------------------------------------

def depends(self, nodes, dependencies):
dependencies = tuple(to_sequence(dependencies))

depends = self.build_manager.depends
for node in to_sequence(nodes):
node.depends(dependencies)
self.build_manager.depends(node, node.dep_nodes)
depends(node, node.dep_nodes)

# -----------------------------------------------------------

Expand Down
Loading

0 comments on commit a4abac0

Please sign in to comment.