Project

General

Profile

« Previous | Next » 

Revision 8880

lib/util.sh: added set_make_vars alias, for use with make-target-style shell functions

View differences:

lib/util.sh
134 134

  
135 135
#### make
136 136

  
137
# usage: target_filename/command () { echo_func "$@"; set_make_vars; ...; }
138
alias set_make_vars="$(cat <<'EOF'
139
local command="${FUNCNAME##*/}"; echo_vars command
140
local target_filename="${FUNCNAME%/*}"; echo_vars target_filename
141
local target="$top_dir/$target_filename"; echo_vars target
142
EOF
143
)"
144

  
137 145
make ()
138 146
{
139 147
	echo_func "$@"

Also available in: Unified diff