aboutsummaryrefslogtreecommitdiff
path: root/shellrc.d/dev
blob: 5206eb5383bf8b61a5885776eb2336cb6061a0b3 (plain)
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
# vim: ft=sh:

if command -v valgrind >/dev/null; then

memcheck() {
	valgrind --track-fds=yes --leak-check=full --track-origins=yes "$@"
}

massif() {
	valgrind --tool=massif "$@"
}

fi


if command -v meson >/dev/null; then

_meson_setup() {
	if [ ! -f "build/build.ninja" ]; then
		meson setup build
	fi
}

mbuild() {
	_meson_setup
	meson compile -C build "$@"
}

mtest() {
	_meson_setup
	meson test -C build "$@"
}

mdist() {
	_meson_setup
	meson dist -C build --formats xztar,gztar,zip "$@"
}

fi