mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-24 21:34:08 +03:00
15 lines
494 B
Makefile
15 lines
494 B
Makefile
|
# Try to guess the build directory:
|
||
|
# we look for subdirectories of ../.. that look like ninja build dirs.
|
||
|
|
||
|
ifeq ($(BUILD_DIR),)
|
||
|
dirs = $(dir $(wildcard ../../*/.ninja_log))
|
||
|
ifeq ($(dirs),)
|
||
|
$(error Cannot guess build dir, set BUILD_DIR)
|
||
|
endif
|
||
|
ifneq ($(firstword $(dirs)),$(dirs))
|
||
|
$(warning Candidates: $(dirs))
|
||
|
$(error Too many build dirs to pick from, set BUILD_DIR)
|
||
|
endif
|
||
|
BUILD_DIR=$(dirs)
|
||
|
endif
|