diff --git a/build/build.sh b/build/build.sh index cd4c6d9..54fb96e 100755 --- a/build/build.sh +++ b/build/build.sh @@ -73,13 +73,12 @@ function build() { # Analize build process to create compile_commands.json function build_db() { - clean "$_default_platform" cd "$_build_folder" || clean_exit 1 "$_error_build_folder" - bear -- scons platform="$_default_platform" - if [ ! -f "../{$_bin_folder}/compile_commands.json" ]; then - cd "../$_bin_folder" || clean_exit 1 "$_error_bin_folder" - ln -s "../${_build_folder}/compile_commands.json" ./ + if [ ! -f "../${_bin_folder}/compile_commands.json" ]; then + bear --output "../${_bin_folder}/compile_commands.json" -- scons platform="$_default_platform" + else + bear --append --output "../${_bin_folder}/compile_commands.json" -- scons platform="$_default_platform" fi cd ..