From be9fc79f77dc686c5f35507204e96879ca8a0704 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 6 Apr 2026 20:40:09 +0200 Subject: [PATCH] harmonize build_oai -c/-C Both do practically the same. Harmonize them into one while guaranteeing backwards compatibility. Signed-off-by: Robert Schmidt --- cmake_targets/build_oai | 15 +++------------ cmake_targets/tools/build_helper | 6 ------ 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index f59a9ebfc7..de6caba969 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -130,12 +130,9 @@ function main() { --build-tool-opt) BUILD_TOOL_OPT+=" $2" shift 2;; - -c | --clean) + -c | --clean | -C | --clean-all) CLEAN=1 shift;; - -C | --clean-all) - CLEAN_ALL=1 - shift;; --clean-kernel) clean_kernel echo_info "Erased iptables config and removed modules from kernel" @@ -382,10 +379,8 @@ function main() { echo "OPENAIR_DIR = $OPENAIR_DIR" - if [ "$CLEAN_ALL" = "1" ] ; then - clean_all_files - echo "Erased all previously producted files" - fi + DIR=$OPENAIR_DIR/cmake_targets + [ "$CLEAN" = "1" ] && rm -rf "$DIR/$BUILD_DIR" if [ "$INSTALL_EXTERNAL" = "1" ] ; then echo_info "Installing packages" @@ -418,10 +413,6 @@ function main() { check_install_additional_tools fi - DIR=$OPENAIR_DIR/cmake_targets - - [ "$CLEAN" = "1" ] && rm -rf $DIR/$BUILD_DIR/build - if [[ $TARGET_LIST != "" ]] && [[ -f $OPENAIR_DIR/CMakeLists.txt ]]; then # add some default libraries that should always be built # for eNB, gNB, UEs, simulators diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 32636a5bb2..37cccec18f 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -140,12 +140,6 @@ clean_kernel() { echo_info "Flushed iptables" } -clean_all_files() { - set_openair_env - dir=$OPENAIR_DIR/cmake_targets - rm -rf $dir/ran_build $dir/ran_build_noLOG -} - ############################################ # External packages installers ############################################