From 201b8ac38fb3f3db5b46c1581aab636b4b885566 Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Thu, 1 Oct 2015 19:25:29 +0200 Subject: [PATCH] Enable rules mixing functions with scriptlets --- waflib/Task.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/waflib/Task.py b/waflib/Task.py index 13d94926..74b187ca 100644 --- a/waflib/Task.py +++ b/waflib/Task.py @@ -1081,9 +1081,13 @@ def compile_fun(line, shell=False): dvars_lst = [] funs_lst = [] for x in line: - fun, dvars = compile_fun(x, shell) - dvars_lst += dvars - funs_lst.append(fun) + if isinstance(x, str): + fun, dvars = compile_fun(x, shell) + dvars_lst += dvars + funs_lst.append(fun) + else: + # assume a function to let through + funs_lst.append(x) def composed_fun(task): for x in funs_lst: ret = x(task)