Project

General

Profile

« Previous | Next » 

Revision 12775

lib/sh/make.sh: added begin_target alias

View differences:

trunk/lib/sh/make.sh
7 7
unset rm # don't allow rm to override remake if an invoked script uses this file
8 8
export remake # propagate to invoked commands by default
9 9

  
10
# helper alias; use begin_target instead
10 11
# usage: target_filename/command() { echo_func; set_make_vars; use $target...; }
11 12
alias set_make_vars="$(cat <<'EOF'
12 13
local command="${FUNCNAME##*/}"; echo_vars command
......
17 18
EOF
18 19
)" # `remake=`: don't progagate remake to prerequisites
19 20

  
21
# usage: target() { begin_target; use $target...; }
22
alias begin_target='echo_func; set_make_vars'
23

  
20 24
# usage: set_make_vars; ...; remaking || check if exists
21 25
# cmd line usage: [remake=1] func
22 26
# **WARNING**: you *MUST* use set_make_vars at the beginning of any function

Also available in: Unified diff