From 7409aee3b69a7de63af7a4c3dd7ea87d84fed0f1 Mon Sep 17 00:00:00 2001 From: Shinichiro Hamaji Date: Tue, 28 Jul 2015 14:52:37 +0900 Subject: [C++] Run $(wildcard) at generation time, not ninja time Also add a test case to wildcard_cache.mk --- func.cc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'func.cc') diff --git a/func.cc b/func.cc index b174a72..e0f9e52 100644 --- a/func.cc +++ b/func.cc @@ -253,13 +253,8 @@ void JoinFunc(const vector& args, Evaluator* ev, string* s) { void WildcardFunc(const vector& args, Evaluator* ev, string* s) { COLLECT_STATS("func wildcard time"); shared_ptr pat = args[0]->Eval(ev); - if (ev->avoid_io()) { - *s += "$(/bin/ls -d "; - *s += *pat; - *s += " 2> /dev/null)"; - return; - } - + // Note GNU make does not delay the execution of $(wildcard) so we + // do not need to check avoid_io here. WordWriter ww(s); vector* files; for (StringPiece tok : WordScanner(*pat)) { -- cgit v1.2.3