Skip to content

Commit eadf6b9

Browse files
author
Martin Belanger
committed
Makefile: Add new targets and update meson command syntax
- For the "install" target, use "--skip-subprojects" so that only nvme-cli (and not the subprojects) get installed. - For the "purge" target, add "meson subprojects purge". - Added "update-subprojects" target - Added "test-strict" target. This is to limit testing to nvme-cli and not all the subprojects. Signed-off-by: Martin Belanger <martin.belanger@dell.com>
1 parent 21516ec commit eadf6b9

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

Makefile

+19-5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ NAME := nvme
99
.DEFAULT_GOAL := ${NAME}
1010
BUILD-DIR := .build
1111

12+
.PHONY: update-subprojects
13+
update-subprojects:
14+
meson subprojects update
15+
1216
${BUILD-DIR}:
1317
meson setup $@
1418
@echo "Configuration located in: $@"
@@ -28,19 +32,29 @@ endif
2832
purge:
2933
ifneq ("$(wildcard ${BUILD-DIR})","")
3034
rm -rf ${BUILD-DIR}
35+
meson subprojects purge --confirm
3136
endif
3237

33-
.PHONY: install dist
34-
install dist: ${BUILD-DIR}
35-
cd ${BUILD-DIR} && meson $@
38+
.PHONY: install
39+
install: ${NAME}
40+
meson install -C ${BUILD-DIR} --skip-subprojects
3641

3742
.PHONY: uninstall
3843
uninstall:
3944
cd ${BUILD-DIR} && meson --internal uninstall
4045

46+
.PHONY: dist
47+
dist: ${NAME}
48+
meson dist -C ${BUILD-DIR} --formats gztar
49+
4150
.PHONY: test
42-
test: ${BUILD-DIR}
43-
ninja -C ${BUILD-DIR} $@
51+
test: ${NAME}
52+
meson test -C ${BUILD-DIR}
53+
54+
# Test strictly nvme-cli (do not run tests on all the subprojects)
55+
.PHONY: test-strict
56+
test-strict: ${NAME}
57+
meson test -C ${BUILD-DIR} --suite nvme-cli
4458

4559
.PHONY: rpm
4660
rpm:

subprojects/openssl.wrap

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[wrap-redirect]
2+
filename = libnvme/subprojects/openssl.wrap

0 commit comments

Comments
 (0)