Revision 9584
Added by Aaron Marcuse-Kubitza over 11 years ago
lib/runscripts/table_dir.run | ||
---|---|---|
8 | 8 |
: "${table="$( log+ 2 cd "$top_dir" ; basename "$PWD")"}" |
9 | 9 |
export schema table |
10 | 10 |
|
11 |
table_make() # usage: [silent=1] table_make target...
|
|
11 |
table_make() |
|
12 | 12 |
# requires Makefile in datasrc dir with `include ../input.Makefile` |
13 | 13 |
# target names are relative to the table subdir itself, not the datasrc dir |
14 | 14 |
{ |
15 |
echo_func; kw_params silent |
|
16 |
make --directory="$(canon_rel_path "$top_dir"/..)" ${silent:+--silent }\ |
|
17 |
"${@/#/$table/}" |
|
15 |
echo_func |
|
16 |
make --directory="$(canon_rel_path "$top_dir"/..)" "${@/#/$table/}" |
|
18 | 17 |
# "${@/#/$table/}": replaces empty str at beginning of str (/#) with $table/ |
19 | 18 |
} |
20 | 19 |
|
lib/sh/make.sh | ||
---|---|---|
26 | 26 |
# usage: set_make_vars; to_target cmd... |
27 | 27 |
alias to_target='stdout="$target" to_file ' # last space alias-expands next word |
28 | 28 |
|
29 |
make() { echo_func; cmd_log_fd=1 self "$@"; } |
|
29 |
make() # usage: [silent=1] table_make target... |
|
30 |
{ |
|
31 |
echo_func; kw_params silent |
|
32 |
cmd_log_fd=1 self ${silent:+--silent } "$@" |
|
33 |
} |
|
30 | 34 |
|
31 | 35 |
top_make() { echo_func; make --directory="$top_dir" "$@"; } |
32 | 36 |
|
Also available in: Unified diff
lib/runscripts/table_dir.run: table_make(): moved $silent flag to lib/sh/make.sh make() so all make callers can use it