mirror of
https://github.com/systemd/systemd.git
synced 2025-03-28 02:50:16 +03:00
test: try to guess the build directory
This will work if $(TOP_SRC_DIR) has exactly one subdirectory with .ninja_deps. Otherwise, BUILD_DIR has to be specified.
This commit is contained in:
parent
209f4b9e33
commit
26116187dd
14
test/Makefile.guess
Normal file
14
test/Makefile.guess
Normal file
@ -0,0 +1,14 @@
|
||||
# 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
|
@ -1,2 +1,4 @@
|
||||
include ../Makefile.guess
|
||||
|
||||
all setup clean run:
|
||||
@basedir=../.. TEST_BASE_DIR=../ ./test.sh --$@
|
||||
@basedir=../.. TEST_BASE_DIR=../ BUILD_DIR=$(BUILD_DIR) ./test.sh --$@
|
||||
|
@ -1,5 +1,7 @@
|
||||
include ../Makefile.guess
|
||||
|
||||
all setup run:
|
||||
@basedir=../.. TEST_BASE_DIR=../ ./test.sh --$@
|
||||
@basedir=../.. TEST_BASE_DIR=../ BUILD_DIR=$(BUILD_DIR) ./test.sh --$@
|
||||
clean:
|
||||
@basedir=../.. TEST_BASE_DIR=../ ./test.sh --clean
|
||||
@rm -f has-overflow
|
||||
|
Loading…
x
Reference in New Issue
Block a user