Skip to content

Commit 899c42b

Browse files
Martin Belangerigaw
authored andcommitted
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 <[email protected]>
1 parent 1cd893d commit 899c42b

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

Makefile

Lines changed: 19 additions & 5 deletions
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:

0 commit comments

Comments
 (0)