Revision 9074
Added by Aaron Marcuse-Kubitza over 11 years ago
make.sh | ||
---|---|---|
3 | 3 |
|
4 | 4 |
if self_not_included; then |
5 | 5 |
|
6 |
# usage: target_filename/command () { echo_func; set_make_vars; ...; }
|
|
6 |
# usage: target_filename/command() { echo_func; set_make_vars; ...; } |
|
7 | 7 |
alias set_make_vars="$(cat <<'EOF' |
8 | 8 |
local command="${FUNCNAME##*/}"; echo_vars command |
9 | 9 |
local target_filename="${FUNCNAME%/*}"; echo_vars target_filename |
... | ... | |
21 | 21 |
# usage: set_make_vars; to_target cmd... |
22 | 22 |
alias to_target='stdout="$target" to_file ' # last space alias-expands next word |
23 | 23 |
|
24 |
make () { echo_func; stdout2stderr=1 limit_stderr_cmd self "$@"; }
|
|
24 |
make() { echo_func; stdout2stderr=1 limit_stderr_cmd self "$@"; } |
|
25 | 25 |
|
26 | 26 |
if false; then ## usage: |
27 | 27 |
inline_make 3<<'EOF' |
... | ... | |
30 | 30 |
EOF |
31 | 31 |
# target will be run automatically because it's first in the makefile |
32 | 32 |
fi ## |
33 |
inline_make ()
|
|
33 |
inline_make() |
|
34 | 34 |
{ |
35 | 35 |
echo_func |
36 | 36 |
local self="$(readlink -f "${BASH_SOURCE[1]}")" |
Also available in: Unified diff
*{.sh,run}: removed extra space between function name and (), which is apparently not needed even though `help function` includes it. this greatly improves readability, including when function names are pasted into commit messages!