Revision 12967
Added by Aaron Marcuse-Kubitza almost 11 years ago
trunk/inputs/GBIF/raw_occurrence_record_plants/run | ||
---|---|---|
155 | 155 |
begin_target; check_target_exists |
156 | 156 |
|
157 | 157 |
table/make |
158 |
self_make table.tsv/make__src_table_run
|
|
158 |
with_rm table.tsv/make__src_table_run
|
|
159 | 159 |
} |
160 | 160 |
|
161 | 161 |
# import() runtime: 5 h ("294m10.322s") @starscream w/o table.tsv.gz/make() |
trunk/inputs/GBIF/_MySQL/GBIFPortalDB-2013-02-20.data.sql.run | ||
---|---|---|
19 | 19 |
^.preamble.sql/make() |
20 | 20 |
{ |
21 | 21 |
begin_target |
22 |
top_file="$dumpfile" self_make ^.preamble.sql/make__resume_import_sh
|
|
22 |
top_file="$dumpfile" with_rm ^.preamble.sql/make__resume_import_sh
|
|
23 | 23 |
} |
24 | 24 |
|
25 | 25 |
fi |
trunk/inputs/IRMNG/homonyms.run | ||
---|---|---|
26 | 26 |
{ |
27 | 27 |
begin_target |
28 | 28 |
*.txt/make |
29 |
self_make import__table_run "$@"
|
|
29 |
with_rm import__table_run "$@"
|
|
30 | 30 |
} |
31 | 31 |
|
32 | 32 |
fi |
trunk/lib/runscripts/util.run | ||
---|---|---|
118 | 118 |
|
119 | 119 |
#### `make` compatibility |
120 | 120 |
|
121 |
main() { begin_target; self_make all; } # support conventional `all` target
|
|
121 |
main() { begin_target; with_rm all; } # support conventional `all` target
|
|
122 | 122 |
|
123 | 123 |
fi |
trunk/lib/runscripts/table.run | ||
---|---|---|
9 | 9 |
{ |
10 | 10 |
echo_func |
11 | 11 |
before_import_cmds |
12 |
self_make import__table_run "$@"
|
|
12 |
with_rm import__table_run "$@"
|
|
13 | 13 |
after_import_cmds |
14 | 14 |
} |
15 | 15 |
fi #### |
... | ... | |
131 | 131 |
import() |
132 | 132 |
{ |
133 | 133 |
begin_target |
134 |
self_make load_data
|
|
134 |
with_rm load_data
|
|
135 | 135 |
postprocess |
136 | 136 |
} |
137 | 137 |
|
trunk/lib/runscripts/mysql.table.run | ||
---|---|---|
56 | 56 |
begin_target |
57 | 57 |
export_mysql |
58 | 58 |
archive_prev_versions |
59 |
self_make import__table_run "$@"
|
|
59 |
with_rm import__table_run "$@"
|
|
60 | 60 |
} |
61 | 61 |
|
62 | 62 |
fi |
trunk/lib/sh/make.sh | ||
---|---|---|
38 | 38 |
# its previous value |
39 | 39 |
alias remaking='test "$_remake"' |
40 | 40 |
|
41 |
# usage: set_make_vars; ...; self_make overridden_target... # progagates $remake
|
|
42 |
function self_make() { remake="$_remake" "$@"; }
|
|
43 |
alias self_make='"self_make" ' # last space alias-expands next word
|
|
41 |
# usage: set_make_vars; ...; with_rm target ... # progagates $rm/$remake
|
|
42 |
function with_rm() { remake="$_remake" "$@"; }
|
|
43 |
alias with_rm='"with_rm" ' # last space alias-expands next word
|
|
44 | 44 |
|
45 | 45 |
# usage: set_make_vars; check_target_exists |
46 | 46 |
alias check_target_exists='remaking || require_not_exists "$target" || return 0' |
Also available in: Unified diff
lib/sh/make.sh: self_make(): renamed to with_rm() for clarity, since this is used only to progagate $rm, and does not also invoke a command with the same name as the current function, as the name might suggest