-
Notifications
You must be signed in to change notification settings - Fork 37
/
Makefile
64 lines (46 loc) · 1.65 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
.PHONY: build fmt check-fmt lint lint-c-fix codespell rpm srpm
DESTDIR ?=
BUILDDIR=builddir
CODESPELL_PARAMS=\
-S Makefile,imgtype,copy,AUTHORS,bin,.git,CHANGELOG.md,changelog.txt,.cirrus.yml,"*.xz,*.gz,*.tar,*.tgz,*ico,*.png,*.1,*.5,*.orig,*.rej,*.xml,*xsl",build.ninja,intro-targets.json,./tests/tests/tier0/proxy-service-fails-on-typo-in-file/systemd/simple.service,tags,./builddir,./subprojects,\
-L keypair,flate,uint,iff,od,ERRO,crate,te \
--ignore-regex=".*codespell-ignore$$"
build:
meson setup $(BUILDDIR)
meson compile -C $(BUILDDIR)
test:
meson setup $(BUILDDIR)
meson configure -Db_coverage=true $(BUILDDIR)
meson compile -C $(BUILDDIR)
meson test -C $(BUILDDIR)
ninja coverage-html -C $(BUILDDIR)
test-with-valgrind: build
meson test --wrap='valgrind --leak-check=full --error-exitcode=1 --track-origins=yes' -C $(BUILDDIR)
install: build
meson install -C $(BUILDDIR) --destdir "$(DESTDIR)"
fmt: build
ninja -C $(BUILDDIR) clang-format
check-fmt: build
ninja -C $(BUILDDIR) clang-format-check
lint-c: build
ninja -C $(BUILDDIR) clang-tidy
lint-c-fix: build
ninja -C $(BUILDDIR) clang-tidy-fix
lint-markdown:
markdownlint-cli2 | echo "markdownlint-cli2 not found, skipping markdown lint"
lint: lint-c lint-markdown
codespell:
codespell $(CODESPELL_PARAMS) -w
check-codespell:
codespell $(CODESPELL_PARAMS)
clean:
find . -name \*~ -delete
find . -name \*# -delete
meson setup --wipe $(BUILDDIR)
rpm: srpm
@build-scripts/build-rpm.sh
srpm:
@rpmbuild || (echo "For building RPM package, rpmbuild command is required. To install use: dnf install rpm-build"; exit 1)
@build-scripts/build-srpm.sh
distclean: clean
rm -rf $(BUILDDIR)