Skip to content

Commit fe5c34c

Browse files
committed
run make with bear for compile_commands.json
1 parent 6acb94d commit fe5c34c

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

scripts/kbu-devel-build

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,19 @@ export CPPFLAGS=-DDEBUG
1010
# for make check:
1111
export VERBOSE=1
1212

13+
bake () {
14+
if command -V bear &>/dev/null; then
15+
bear make "$@"
16+
else
17+
make "$@"
18+
fi
19+
}
20+
1321
build () {
1422
./autogen.sh
1523
./configure --prefix="$HOME"/PREFIX/gtd-gc --with-trang="$HOME"/.jedit/jars/trang.jar --enable-checker
16-
make -j3
17-
make -j3 install
24+
bake -j3
25+
bake -j3 install
1826
for prog in "$HOME"/PREFIX/gtd-gc/bin/divvun*; do
1927
PATH="$HOME/PREFIX/gtd-gc/bin/:$PATH" \
2028
help2man -N \
@@ -23,7 +31,7 @@ build () {
2331
"${prog##*/}" \
2432
> src/"${prog##*/}".1
2533
done
26-
make -j3 check
34+
bake -j3 check
2735
git ls-files src | grep pp$ | grep -ve mapbox -e cxxopts | xargs -I{} clang-tidy --checks='-*,modernize-*,-modernize-make-unique,-modernize-pass-by-value,-modernize-raw-string-literal' {} -- -Isrc -std=c++11
2836
}
2937

0 commit comments

Comments
 (0)