fixes to dependency resolution
This commit is contained in:
parent
c20e1e8f1c
commit
574ce6eab3
@ -28,9 +28,13 @@ build_static_lib:
|
||||
build_static_lib_dbg:
|
||||
@cbuild/call_task.sh build_static_lib_dbg 2>&1 | tee make_raw.log
|
||||
|
||||
# recompile libsome_dep.a in the next build task
|
||||
######################################
|
||||
###### Rebuild dependencies #######
|
||||
######################################
|
||||
|
||||
# recompile libsome.a in the next build task
|
||||
#rebuild_some_dep:
|
||||
# @cbuild/rebuild_dep.sh libsome_dep.a 2>&1 | tee make_raw.log
|
||||
# @cbuild/rebuild_dep.sh libsome.a 2>&1 | tee make_raw.log
|
||||
|
||||
#rebuild_all: rebuild_some_dep
|
||||
|
||||
|
||||
@ -12,12 +12,14 @@ done
|
||||
set +e
|
||||
OLDIFS="$IFS"
|
||||
IFS=$'\n'
|
||||
cd "$DEPS_BASEDIR"
|
||||
for dep in $DEPS; do
|
||||
dep_dir=$(echo ${dep/=*/} | tr -d '[:blank:]')
|
||||
myprint "${CYAN}--------------[$dep_dir]--------------"
|
||||
cd "$DEPS_BASEDIR/$dep_dir"
|
||||
cd "$dep_dir"
|
||||
make clean
|
||||
cd ..
|
||||
done
|
||||
IFS="$OLDIFS"
|
||||
cd ..
|
||||
set -e
|
||||
@ -97,11 +97,12 @@ function handle_static_dependency {
|
||||
[[ -z "$lib_build_task" ]] && error "lib_build_task is empty"
|
||||
myprint "${BLUE}making $lib_file by task $lib_build_task"
|
||||
|
||||
local proj_root_dir="$(pwd)"
|
||||
cd "$deps_basedir/$lib_project_dir"
|
||||
if ! make "$lib_build_task"; then
|
||||
exit 1
|
||||
fi
|
||||
cd ..
|
||||
cd "$proj_root_dir"
|
||||
|
||||
cp "$deps_basedir/$lib_project_dir/$lib_build_dir/$lib_file" "$OBJDIR/libs/"
|
||||
myprint "${GREEN}copied ${CYAN}$lib_file to $OBJDIR/libs/"
|
||||
@ -112,7 +113,7 @@ function handle_static_dependency {
|
||||
function resolve_dependencies {
|
||||
deps_basedir=$1
|
||||
deps=$2
|
||||
[[ -z "$deps_basedir" ]] && deps_basedir=.
|
||||
[[ -z "$deps_basedir" ]] && deps_basedir="."
|
||||
OLDIFS="$IFS"
|
||||
IFS=$'\n'
|
||||
# Evalueting dependency expressions.
|
||||
|
||||
@ -3,5 +3,5 @@ source "cbuild/init.sh"
|
||||
|
||||
target_file="$1"
|
||||
touch ".rebuild_$target_file.tmp"
|
||||
rm -fv "$OBJDIR/libs/$target_file.a"
|
||||
rm -fv "$OBJDIR/libs/$target_file"
|
||||
myprint "${YELLOW}dependency ${WHITE}$target_file ${YELLOW}will be rebuilt with the next build task"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user