Project

General

Profile

« Previous | Next » 

Revision 9386

lib/runscripts/table.run: input_make(): renamed to table_make() to make it clear that the target names are relative to the table subdir itself, not the datasrc dir. it was previously called input_make because it used inputs/input.Makefile directly, but now will use any Makefile in the datasrc dir.

View differences:

inputs/GBIF/raw_occurrence_record/run
6 6
table.tsv.md5/make()
7 7
{
8 8
	echo_func; set_make_vars; check_target_exists
9
	silent=1 input_make "$target_filename"
9
	silent=1 table_make "$target_filename"
10 10
}
11 11

  
12 12
func_override table.tsv/make__src_table_run
lib/runscripts/table.run
25 25
mk_esc_name table
26 26
export schema table
27 27

  
28
input_make() # usage: [silent=1] input_make target...
28
table_make() # usage: [silent=1] table_make target...
29 29
# requires Makefile in datasrc dir with `include ../input.Makefile`
30
# target names are relative to the table subdir itself, not the datasrc dir
30 31
{
31 32
	echo_func; kw_params silent
32 33
	make --directory="$top_dir"/.. ${silent:+--silent }"${@/#/$table/}"
......
36 37
map_table()
37 38
{
38 39
	echo_func
39
	input_make map.csv
40
	table_make map.csv
40 41
	psql <<EOF
41 42
SELECT util.reset_map_table('pg_temp.map');
42 43
\copy pg_temp.map FROM 'map.csv' CSV HEADER;
......
51 52
	echo_func
52 53
	public_schema_exists || return 0
53 54
	rm header.csv map.csv # remake them
54
	yes|input_make test
55
	yes|table_make test
55 56
}
56 57

  
57 58
postprocess() # overridable

Also available in: Unified diff