Skip to content

Commit 74acad4

Browse files
mtjhrcslp
authored andcommitted
Makefile: Split test target into test-prefix and test
Add test-prefix target for building and installing libkrun to the test prefix prefix without actually running the tests. Signed-off-by: Matej Hrica <[email protected]>
1 parent 13b8cd5 commit 74acad4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ ifeq ($(PREFIX),)
9090
PREFIX := /usr/local
9191
endif
9292

93-
.PHONY: install clean test $(LIBRARY_RELEASE_$(OS)) $(LIBRARY_DEBUG_$(OS)) libkrun.pc
93+
.PHONY: install clean test test-prefix $(LIBRARY_RELEASE_$(OS)) $(LIBRARY_DEBUG_$(OS)) libkrun.pc
9494

9595
all: $(LIBRARY_RELEASE_$(OS)) libkrun.pc
9696

@@ -157,7 +157,11 @@ clean:
157157
rm -rf test-prefix
158158
cd tests; cargo clean
159159

160-
test: $(LIBRARY_RELEASE_$(OS))
160+
test-prefix/lib64/libkrun.pc: $(LIBRARY_RELEASE_$(OS))
161161
mkdir -p test-prefix
162162
PREFIX="$$(realpath test-prefix)" make install
163+
164+
test-prefix: test-prefix/lib64/libkrun.pc
165+
166+
test: test-prefix
163167
cd tests; LD_LIBRARY_PATH="$$(realpath ../test-prefix/lib64/)" PKG_CONFIG_PATH="$$(realpath ../test-prefix/lib64/pkgconfig/)" ./run.sh

0 commit comments

Comments
 (0)