# list target without color, remove Lua embedding, remove empty and space only line, remove objs/*, remove path for lua binding, remove trailing spaces, change line return for space
if [ -z "$_waf_comp_targets" ]; then
opts=$(./waf list -c no | sed -e '/^Embedding/d' -e '/^ *$/d' -e '/objs\//d' -e '$d' -e '/^\//d' | tr -d " " | tr '\n' ' ')
# list target without color, remove Lua embedding, remove empty and space only line, remove objs/*, remove path for lua binding, remove trailing spaces, change line return for space
_waf_comp_targets=$(./waf list -c no | sed -e '/^Embedding/d' -e '/^ *$/d' -e '/objs\//d' -e '$d' -e '/^\//d' | tr -d " " | tr '\n' ' ')
'(- 1 *)'{-h,--help}'[show help options and exit]' \
'(- 1 *)'{-h,--help}'[show help options and exit]' \
@ -38,6 +43,13 @@ _waf() {
esac
esac
}
}
_waf_caching_policy () {
# rebuild if cache is more than 3 days old
local -a oldp
oldp=( "$1"(Nm+3) )
(( $#oldp ))
}
(( $+functions[_waf_boards] )) ||
(( $+functions[_waf_boards] )) ||
_waf_boards() {
_waf_boards() {
local boards; boards=( $(./waf list_boards | sed -e '$d'))
local boards; boards=( $(./waf list_boards | sed -e '$d'))
@ -46,9 +58,15 @@ _waf_boards() {
(( $+functions[_waf_targets] )) ||
(( $+functions[_waf_targets] )) ||
_waf_targets() {
_waf_targets() {
# list target without color, remove Lua embedding, remove empty and space only line, remove objs/*, remove path for lua binding, remove trailing spaces, change line return for space
# Cache the list of targets available
local targets; targets=( $(./waf list -c no | sed -e '/^Embedding/d' -e '/^ *$/d' -e '/objs\//d' -e '$d' -e '/^\//d' | tr -d " " | tr '\n' ' '))
# list target without color, remove Lua embedding, remove empty and space only line, remove objs/*, remove path for lua binding, remove trailing spaces, change line return for space
_waf_comp_targets=( $(./waf list -c no | sed -e '/^Embedding/d' -e '/^ *$/d' -e '/objs\//d' -e '$d' -e '/^\//d' | tr -d " " | tr '\n' ' '))