9a4e3625a068a173ae713b68737a06191da37aad
2 # Copyright (C) 2024 Jérémie Galarneau <jeremie.galarneau@efficios.com>
4 # SPDX-License-Identifier: LGPL-2.1-only
9 # Run make quietly to check if a Makefile exists
10 make_output
=$
(make -C "$source_dir" -q 2>&1)
13 # Check the return status of make -q
14 if [ $make_exit_status -eq 2 ]; then
15 # It seems the Makefiles don't exist. Most likely the user forgot to
18 echo -e "\033[33mMake couldn't find a Makefile: did you run ./bootstrap and ./configure ?\033[0m"
22 # Check if compile_commands.json does not exist in the source directory and if bear is installed
23 if [ ! -f "$source_dir/compile_commands.json" ] && which bear
>/dev
/null
2>&1; then
24 # Bear is installed and compile_commands.json is not present
25 # Perform a make clean since compile_commands.json is missing and bear is installed
26 make -C "$source_dir" clean
28 # Prefix bear to the make command
29 command_prefix
="bear -- "
32 # Run make with or without bear prefix, depending on the condition above
33 eval "${command_prefix}"make -C "$source_dir" -j "$(nproc)"
This page took 0.033467 seconds and 5 git commands to generate.