=== modified file 'bin/fsb' --- bin/fsb 2013-06-04 19:45:06 +0000 +++ bin/fsb 2013-05-28 20:36:58 +0000 @@ -172,7 +172,7 @@ if [[ $info[DIR] == *'%s'* ]]; then info[DIR]=${${info[DIR]}//\%s/${build_dir_base}} fi - build_dir_check ${info[DIR]} ${info[FUNC]} + build_dir_check ${info[DIR]} $1 local ret=$? if (( $ret == 100 )) ; then if [[ -n $info[DEPEND] ]]; then @@ -192,7 +192,7 @@ target_stack_build() { local -A info - local k v mark + local k v for k v in ${(kvP)build_stack[${1:-1}]}; do typeset "info[$k]"=$v done @@ -209,8 +209,7 @@ fi build_dir=$info[DIR] ${fsb_targets[${info[FUNC]}]} build || die "${info[FUNC]} build failed" - mark=${info[FUNC]#fsb_target_} - grep -qFe $mark $build_dir/.fsb_done || print -r - $mark >> $build_dir/.fsb_done + grep -qFe $1 $build_dir/.fsb_done || print -r - $1 >> $build_dir/.fsb_done } build_target() { @@ -228,6 +227,7 @@ [[ -a $1 ]] || return 100 # does not exist, proceed building [[ -d $1 ]] || die "$1 is not a directory, required by target $2" if [[ -f $1/.fsb_done ]] && grep -qFe $name $1/.fsb_done; then + [[ $1:a == $build_dir:a ]] || build_dir_push $1 return 0 # target already completed in this directory fi # scrap incomplete build