mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-12-11 14:15:12 -05:00
Statup scripts ensure that output directories exist.
This commit is contained in:
parent
5365223fe9
commit
8b0048d488
4 changed files with 27 additions and 10 deletions
|
|
@ -39,16 +39,7 @@ PP_VF_TASKS_C=`pp_vf_tasks_c $REPO_BASE_DIR`
|
|||
|
||||
DIFF_REPORT=`diff_report $REPO_BASE_DIR`
|
||||
|
||||
# Ensure that all output directories exist
|
||||
if [ ! -d "$LOG_DIR" ]; then
|
||||
mkdir "$LOG_DIR"
|
||||
fi
|
||||
if [ ! -d "$STATS_DIR" ]; then
|
||||
mkdir "$STATS_DIR"
|
||||
fi
|
||||
if [ ! -d "$PP_OUT_DIR" ]; then
|
||||
mkdir "$PP_OUT_DIR"
|
||||
fi
|
||||
ensure_output_dirs_exist $REPO_BASE_DIR
|
||||
|
||||
echo preprocessing production version of 'tasks.c'
|
||||
$PP $PROD_TASKS_C $PP_PROD_TASKS_C \
|
||||
|
|
|
|||
|
|
@ -206,4 +206,27 @@ function diff_report() {
|
|||
}
|
||||
|
||||
|
||||
# Ensures that all potentially relevant output direcories exist.
|
||||
#
|
||||
# Expected arguments:
|
||||
# $1 : Absolute path to the repository's base
|
||||
function ensure_output_dirs_exist() {
|
||||
REPO_BASE_DIR="$1"
|
||||
|
||||
PP_OUT_DIR=`pp_out_dir $REPO_BASE_DIR`
|
||||
STATS_DIR=`stats_dir $REPO_BASE_DIR`
|
||||
PP_LOG_DIR=`pp_log_dir $REPO_BASE_DIR`
|
||||
|
||||
if [ ! -d "$PP_OUT_DIR" ]; then
|
||||
mkdir "$PP_OUT_DIR"
|
||||
fi
|
||||
if [ ! -d "$STATS_DIR" ]; then
|
||||
mkdir "$STATS_DIR"
|
||||
fi
|
||||
if [ ! -d "$PP_LOG_DIR" ]; then
|
||||
mkdir "$PP_LOG_DIR"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ PROOF_FILES_DIR=`vf_proof_dir $REPO_BASE_DIR`
|
|||
PP_ERR_LOG="`pp_log_dir $REPO_BASE_DIR`/preprocessing_errors.txt"
|
||||
|
||||
|
||||
ensure_output_dirs_exist $REPO_BASE_DIR
|
||||
|
||||
"$PREP" "$TASK_C" "$PP_TASK_C" "$PP_ERR_LOG" \
|
||||
"$REPO_BASE_DIR" "$VF_PROOF_BASE_DIR" "$VF_DIR"
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ then
|
|||
fi
|
||||
|
||||
|
||||
ensure_output_dirs_exist $REPO_BASE_DIR
|
||||
|
||||
"$PREP" "$TASK_C" "$PP_TASK_C" "$PP_ERR_LOG" \
|
||||
"$REPO_BASE_DIR" "$VF_PROOF_BASE_DIR" "$VF_DIR"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue