1 # Try to guess the build directory:
2 # we look for subdirectories of ../.. that look like ninja build dirs.
5 dirs = $(dir $(wildcard ../../*/.ninja_log))
7 $(error Cannot guess build dir, set BUILD_DIR)
9 ifneq ($(firstword $(dirs)),$(dirs))
10 $(warning Candidates: $(dirs))
11 $(error Too many build dirs to pick from, set BUILD_DIR)