diff options
Diffstat (limited to 'include/tree.sh')
-rw-r--r-- | include/tree.sh | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/include/tree.sh b/include/tree.sh index 450d79cf..166a3d86 100644 --- a/include/tree.sh +++ b/include/tree.sh @@ -8,7 +8,9 @@ flag="" # macros, overridden depending on the flag +if_do_make="" if_dry_build=":" +if_not_do_make=":" if_not_dry_build="" autoconfargs="" @@ -23,7 +25,6 @@ cmakedir="" cmd="" defconfig="" dest_dir="" -do_make="" elfdir="" forcepull="" gccdir="" @@ -75,24 +76,25 @@ trees() # where only a subset of build tasks are done, # and $if_not_dry_build is prefixed to skipped commands - if_not_dry_build=":" if_dry_build="" + if_not_dry_build=":" ;; -b) : ;; -u) mode="oldconfig" ;; -m) mode="menuconfig" ;; -c) mode="distclean" ;; -x) mode="crossgcc-clean" ;; - -f) # download source code for a project - do_make="n" # lets us know not to build anything - if_not_dry_build=":" + -f|-F) # download source code for a project + # macros. colon means false. + if_do_make=":" if_dry_build="" - ;; - -F) # same as -F, but don't skip git fetch/pull on cache - do_make="n" # lets us know not to build anything + if_not_do_make="" if_not_dry_build=":" - if_dry_build="" - forcepull="y" + if [ "$flag" = "-F" ]; then + # don't skip git fetch/pull on cached src + + forcepull="y" + fi ;; -s) mode="savedefconfig" ;; -l) mode="olddefconfig" ;; @@ -319,12 +321,8 @@ configure_project() break fi - if [ "$do_make" != "n" ]; then - # if we're *downloading* a project, then - # we don't need to to change the target.cfg - + $if_do_make \ break - fi if [ "${_tcfg%/*/target.cfg}" = "${_tcfg%"/$tree/target.cfg"}" ] then # we have found the main source tree that @@ -356,14 +354,11 @@ configure_project() if [ ! -f "CHANGELOG" ]; then delete_old_project_files - fi - if [ "$do_make" = "n" ]; then - if [ ! -f "CHANGELOG" ]; then + $if_not_do_make \ fetch_${cmd#build_} - fi - - return 1 fi + $if_not_do_make \ + return 1 x_ ./mk -f "$project" "$target" } |