Project

General

Profile

1
selfDir_uZPPqC := $(dir $(lastword $(MAKEFILE_LIST)))
2
root := $(selfDir_uZPPqC)..
3
include $(root)/lib/common.Makefile
4

    
5

    
6
##### Configuration
7

    
8
# Command line
9
full_import ?=
10
import_source ?= 1
11
log ?= $(if $(test),,1)
12
noclobber ?=
13
profile ?=
14
quiet ?=
15
reverify ?= 1
16
schema_only ?=
17
use_staged ?= $(by_col)
18

    
19
# Makefile
20
exts ?= csv tsv tab txt dat dmp xml
21
test_n ?= 2
22

    
23
##### Vars/functions
24

    
25
# Paths
26
datasrc := $(patsubst .%,%,$(notdir $(realpath .)))
27
bin := $(root)/bin
28
mappings := $(root)/mappings
29

    
30
# Make
31
SHELL := /bin/bash
32
selfMake = $(MAKE) --makefile=../input.Makefile
33
subMake = $(MAKE) $(@:$(root)/%=%) --directory=$(root)
34
+_ = $(+:_%=)
35
addBeforeExt = $(basename $(2))$(1)$(suffix $(2))
36

    
37
# Terminal
38
termCols := $(shell tput cols)
39

    
40
# Commands
41
MKDIR = mkdir -p
42
mkdir = $(MKDIR) $(@D)
43
diff = diff --unified=2
44
diffIgnoreSpace = $(diff) --ignore-space-change
45
diffVerbose = $(if $(verbose),diff --side-by-side --left-column\
46
--width=$(termCols),$(diff))
47

    
48
# BIEN commands
49
sortFilenames = $(shell $(bin)/sort_filenames $(1))
50
selfMap = $(bin)/cols 0 0
51
psqlAsBien := $(bin)/psql_verbose_vegbien
52
psqlNoSearchPath := env no_search_path=1 $(psqlAsBien)
53
# Usage: ($(inDatasrc); cat $(file))|$(psqlCmd)
54
inDatasrc := echo 'SET search_path TO "$(datasrc)";'
55

    
56
# SVN
57
setSvnIgnore = svn propset svn:ignore $(2) $(1)
58
define addDirWithIgnore
59
$(addDir)
60
$(setSvnIgnore)
61
endef
62

    
63
##### Environment
64

    
65
export PATH := $(bin):$(PATH)
66

    
67
##### General targets
68

    
69
all: _always maps ;
70

    
71
clean: _always
72
	$(RM) $(all)
73

    
74
remake: _always clean
75
	+$(selfMake)
76
# re-run make so that cache of existing files is reset
77

    
78
# Only remake if doesn't exist. This prevents unintentional remaking when the
79
# make script is newly checked out from svn (which sets the mod time to now) but
80
# the output is synced externally.
81
# Can't remove prereq to do this, because it determines when the rule applies.
82
make_script = $(if $(wildcard $@),,"time" ./$< >$@)
83

    
84
%/: %/map.csv _always ;
85

    
86
%/: % _always ;
87

    
88
%: %.make
89
	$(make_script)
90
.PRECIOUS: % # save partial outputs of aborted src make scripts
91

    
92
##### Tables discovery
93

    
94
sortFile := import_order.txt
95
noImportFile := _no_import
96

    
97
dontImport = $(wildcard $(noImportFile))$(wildcard $(1)/$(noImportFile))$(if\
98
$(import_source),,$(filter Source,$(1)))
99

    
100
sort_file_tables := $(if $(wildcard $(sortFile)),$(shell cat $(sortFile)))
101
    # $(shell) replaces "\n" with " "
102
tables := $(sort_file_tables)
103
allSubdirs := $(call wildcard/,*/)
104
allTables := $(call sortFilenames,$(filter-out _% verify logs,$(allSubdirs:%/=%)))
105
joinedTables := $(filter-out $(tables),$(allTables))
106
allTables := $(strip $(joinedTables) $(tables))# move joined tables to beginning
107
has_visible_files = $(call wildcard/,$(1)/*)
108
allTables := $(foreach table,$(allTables),$(if\
109
$(call has_visible_files,$(table)),$(table)))
110
ifeq ($(tables),)# none specified in sort file
111
tables := $(allTables)
112
endif
113
importTables := $(foreach table,$(tables),$(if\
114
$(call dontImport,$(table)),,$(table)))
115

    
116
list_tables: _always # use `make -s` to avoid echoing commands
117
	@for table in $(tables); do echo "$$table"; done
118

    
119
$(sortFile): _always
120
	# add any missing tables to $(sortFile)
121
	$(if $(filter $(sort_file_tables),$(tables)),,$(selfMake) -s list_tables >$@)
122

    
123
##### SVN
124

    
125
svnFilesGlob:= */{,$(noImportFile),{,.}{map,VegBIEN}.csv{,.*},*header.*,*.sql,test.xml.ref}
126
svnFilesGlob := {map.csv,*{schema,~}*.sql,{,*/}{*.make,*terms.csv},$(svnFilesGlob)}
127
_svnFilesGlob := {_MySQL/{,*schema*.sql,*.make},{,*/}{*{run,Makefile},*.{md5,url,pdf},*README.TXT}}
128
svnFiles = $(filter-out _% logs/% %.data.sql,$(call wildcard/,$(svnFilesGlob)))\
129
$(call wildcard/,$(_svnFilesGlob))
130

    
131
# To update all inputs with these settings: make inputs/add
132
add: _always Source/add $(allTables:%=%/add)
133
	$(call setSvnIgnore,.,'*')
134
	$(call addDirWithIgnore,logs,$$'*.gz\n*.log.sql\n*.trace')
135
	$(call addDirWithIgnore,verify,$$'*.out\n*.csv\n*.xls\n*.xlsx')
136
	$(call addFile,import_order.txt)
137
	$(if $(wildcard _MySQL/),$(call addDirWithIgnore,_MySQL,'*'))
138
	$(if $(wildcard _src/),$(call addDirWithIgnore,_src,'*'))
139
	$(if $(wildcard _archive/),$(call addDirWithIgnore,_archive,'*'))
140
	$(call add*,$(svnFiles))
141

    
142
# Adds a new table subdir
143
%/add: _always
144
	$(call addDirWithIgnore,$*,'*')
145
	$(call addDirWithIgnore,$*/logs,$$'*.gz\n*.log.sql\n*.trace')
146

    
147
##### Existing maps discovery
148

    
149
anyMap := %/map.csv %/VegBIEN.csv %/unmapped_terms.csv %/new_terms.csv
150

    
151
exts := $(call ci,$(exts))
152
extsFilter := $(addprefix %.,$(exts))
153
dataOnly = $(filter $(extsFilter),$(1))
154

    
155
anyTest = $*/test.%
156
srcsOnly = $(filter-out $(anyMap) $(anyTest) %/logs,$(call dataOnly,$(1)))
157

    
158
srcDict := map.csv
159

    
160
vocab := $(mappings)/VegCore.vocab.csv
161
thesaurus := $(mappings)/VegCore.thesaurus.csv
162
coreMap := $(mappings)/VegCore-VegBIEN.csv
163

    
164
viaMaps := $(importTables:%=%/map.csv)
165

    
166
autogenMaps := $(subst map.,VegBIEN.,$(viaMaps))
167
directMaps := $(autogenMaps) $(filter-out $(autogenMaps),\
168
$(wildcard */VegBIEN.csv))
169

    
170
##### Sources
171

    
172
srcs = $(call sortFilenames,$(call srcsOnly,$(wildcard $*/*)))
173
nonHeaderSrcs = $(filter-out %/header.csv,$(srcs))
174
isRef = $(if $(nonHeaderSrcs),,1)
175
    # empty subdir, so references an already-installed staging table
176
isXml = $(filter %.xml,$(nonHeaderSrcs))
177
nonXml = $(if $(isXml),,1)
178
isCsv = $(if $(nonHeaderSrcs),$(if $(isXml),,1))
179
    # true if $(srcs) non-empty and contains no *.xml
180
catSrcs = $(bin)/cat$(if $(nonXml),_csv) $(nonHeaderSrcs)
181
withCatSrcs = $(catSrcs:$(bin)/%=$(bin)/with_%) --
182

    
183
# Run with `make -s` to avoid echoing make commands
184
cat: $(importTables:%=%/cat) _always ;
185

    
186
%/cat: _always
187
	$(catSrcs)
188

    
189
##### Input data retrieval
190

    
191
# Must come before `%.sql: _MySQL/%.sql` to override it
192
%.sql: %.sql.make
193
	$(make_script)
194

    
195
# The export must be created with:
196
# `--compatible=postgresql --add-locks=false --set-charset --no-create-info`
197
# Must come before `%.sql: _MySQL/%.sql` to override it
198
%.data.sql: _MySQL/%.data.sql
199
	$(if $(wildcard $@),,$(bin)/my2pg.data <$< >$@)
200

    
201
# The export must be created with:
202
# `--compatible=postgresql --add-locks=false --set-charset`
203
# Add `--no-data` to create a schema-only export.
204
%.sql: _MySQL/%.sql
205
	$(if $(wildcard $@),,$(bin)/my2pg <$< >$@)
206

    
207
##### Staging tables installation
208

    
209
srcTable := %.src
210

    
211
dbExportsWildcard = $(sort $(patsubst _MySQL/%.make,%,$(wildcard\
212
$(1) _MySQL/$(1).make)))
213

    
214
dbExports := $(call dbExportsWildcard,*schema*.sql)# schemas first
215
ifeq ($(schema_only),) # add rest of .sql files
216
dbExports += $(filter-out $(dbExports),$(call dbExportsWildcard,*.sql))
217
endif
218
dbExports := $(strip $(dbExports))# += adds extra whitespace
219
allInstalls := $(if $(dbExports),sql) $(filter-out Source,$(allTables))
220

    
221
install: _always schema $(allInstalls:%=%/install) ;
222

    
223
uninstall: _always confirm_rm_schema rm_schema ;
224
# rm_schema will also drop all staging tables
225

    
226
reinstall: _always uninstall install ;
227

    
228
confirm_rm_schema: _always
229
	$(if $(filter TNRS,$(datasrc)),$(call confirm,WARNING: This will delete the\
230
TNRS cache!,To save it: make backups/TNRS.backup-remake))
231

    
232
schema: _always
233
	-echo 'CREATE SCHEMA "$(datasrc)";'|$(psqlNoSearchPath)
234
# ignore errors if schema exists
235

    
236
rm_schema: _always
237
	echo 'DROP SCHEMA IF EXISTS "$(datasrc)" CASCADE;'|$(psqlNoSearchPath)
238

    
239
installLog := logs/install.log.sql
240

    
241
log_dir = $(1)logs
242
has_log_dir = $(call and,$(wildcard $(log_dir)),$(call not,$(noclobber)))
243
logInstall = $(if $(has_log_dir),$(if $(quiet),$(2)$(1)$(installLog)\
244
2>&1,2>&1|tee $(3) $(1)$(installLog)))
245
logInstallRoot = $(call logInstall,,>)
246
logInstall* = $(call logInstall,$*/,>)
247
logInstall*Add = $(call logInstall,$*/,>>,-a)# append to log
248

    
249
# Must come before %/install to override it
250
sql/install: $(dbExports)
251
	($(inDatasrc); cat $+|pg_dump_limit)|"time" env no_search_path=1 \
252
$(bin)/psql_script_vegbien --set=schema='"$(datasrc)"' $(logInstallRoot)
253

    
254
cleanup = $(if $(wildcard $*/cleanup.sql),($(inDatasrc); cat $*/cleanup.sql)\
255
|"time" $(psqlNoSearchPath) --echo-all --set=table='"$*"' $(logInstall*Add),\
256
(export schema=$(datasrc) table=$*; . $(bin)/vegbien_dest; unset schemas; \
257
$(bin)/csv2db) $(logInstall*Add))
258

    
259
%/header.csv:
260
	echo 'COPY (SELECT * FROM "$(datasrc)"."$*" LIMIT 0) TO STDOUT CSV HEADER;'|\
261
env no_search_path=1 $(bin)/psql_script_vegbien >$*/header.csv
262

    
263
exportHeader = $(selfMake) $*/header.csv
264

    
265
# Don't try to edit a view. Must come before %/install to override it.
266
%_view/install: _always ;
267

    
268
%.sql/run: _always
269
	$(if $(wildcard $(@D)),($(inDatasrc); cat $(@D))|(cd '$(*D)';\
270
"time" env no_search_path=1 ../$(bin)/psql_verbose_vegbien \
271
--set=table='"$(*D)"' --set=table_str=\''"$(*D)"'\'))
272

    
273
%/postprocess: _always
274
	$(if $(wildcard $*/run),,$(selfMake) $*/postprocess.sql/run)
275
	$(if $(wildcard $*/import),$*/import)
276

    
277
# For staging tables which are derived by joining together other staging tables.
278
%/install %/header.csv: %/create.sql _always
279
	($(inDatasrc); echo 'CREATE TABLE "$*" AS'; cat $<; echo ';')|"time" \
280
$(psqlNoSearchPath) --echo-all --set=schema='"$(datasrc)"' --set=table='"$*"' \
281
$(logInstall*)
282
	$(selfMake) $*/postprocess
283
	$(exportHeader)
284
	$(cleanup)
285
ifneq ($(noclobber),)
286
.PRECIOUS: %/header.csv
287
endif
288

    
289
%/install: _always
290
	$(if $(isCsv),$(import_install_))
291
	$(selfMake) $*/postprocess
292
	-$(exportHeader)
293
	-$(if $(isCsv),,$(cleanup))
294
# ignore errors if table does not exist (non-data dir)
295
define import_install_
296
(. $(bin)/vegbien_dest; unset schemas; "time" nice -n +5\
297
env schema=$(datasrc) table=$* $(bin)/csv2db $(catSrcs) $(logInstall*))
298
$(if $(filter $(srcTable),$*),($(inDatasrc);\
299
echo 'ALTER TABLE "$(datasrc)"."$*" RENAME row_num TO "$*.row_num";')|"time"\
300
$(psqlNoSearchPath) --echo-all --set=table='"$*"' $(logInstall*Add))
301
endef
302
# table-scope src table's row_num col to allow joining it with other tables
303

    
304
%/uninstall: _always
305
	echo 'DROP TABLE IF EXISTS "$(datasrc)"."$*" CASCADE;'|$(psqlNoSearchPath)
306

    
307
%/reinstall: _always %/uninstall %/install ;
308

    
309
postprocess: _always $(allTables:%=%/postprocess) ;
310

    
311
cleanup: _always $(tables:%=%/cleanup) ;
312

    
313
# WARNING: This removes any index comments, due to a PostgreSQL bug.
314
# This occurs because ALTER TABLE recreates the index but not its comment.
315
%/cleanup: _always
316
	$(cleanup)
317

    
318
##### Maps building
319

    
320
# Maps to (try to) build are added to this
321
maps :=
322

    
323
srcRoot = $(mappings)/root.sh
324
mkSrcMap = (. $(srcRoot); env datasrc=$(datasrc) $(bin)/src_map <$*/header.csv\
325
>$@)
326

    
327
translate = $(if $(wildcard $(1)),$(bin)/in_place $< $(bin)/translate_ci 1 $(1))
328

    
329
$(srcDict):# empty target in case it doesn't exist
330

    
331
# Via maps cleanup
332
ifneq ($(filter %/.map.csv.last_cleanup,$(MAKECMDGOALS)),)
333
%/.map.csv.last_cleanup: %/map.csv $(vocab) $(thesaurus) $(coreMap) $(srcDict)
334
	$(call translate,$(srcDict))
335
	$(bin)/in_place $< $(bin)/canon 1 $(vocab)
336
	$(call translate,$(thesaurus))
337
	$(bin)/in_place $< $(bin)/fix_line_endings
338
	touch $@
339
	+$(selfMake) $(<:%/map.csv=%/unmapped_terms.csv)
340
	+$(selfMake) $(<:%/map.csv=%/new_terms.csv)
341
.PRECIOUS: %/.map.csv.last_cleanup
342
else
343
%/map.csv: _always
344
	$(if $(wildcard $@),,$(mk_map_csv))
345
	+$(selfMake) $(@:%/map.csv=%/.map.csv.last_cleanup)
346
define mk_map_csv
347
+$(selfMake) $*/header.csv
348
$(if $(nonXml),$(mkSrcMap))
349
endef
350
endif
351

    
352
%/VegBIEN.csv: %/map.csv $(coreMap)
353
	<$< $(bin)/cat_cols 1 2$(if $(wildcard\
354
$*/run),|$(bin)/cols 1 1 3|(head -1 $<; tail -n +2)\
355
)|$(bin)/join $(coreMap)|$(bin)/sort_map >$@
356
maps += $(autogenMaps)
357

    
358
maps: $(maps) _always ;
359

    
360
all += $(maps)
361

    
362
##### Maps validation
363

    
364
# `tail -n +2`: Remove header before running filter_out_ci because filter_out_ci
365
# only removes the header if it matches the vocabulary's header.
366

    
367
%/unmapped_terms.csv: %/map.csv $(coreMap)
368
	tail -n +2 $<|$(bin)/cols 1|$(bin)/filter_out_ci 0 $(coreMap) >$@
369
	$(bin)/autoremove $@
370

    
371
%/new_terms.csv: %/map.csv $(vocab) $(thesaurus) %/unmapped_terms.csv
372
	$(newTerms)
373
	$(bin)/autoremove $@
374
newTerms = tail -n +2 $<|$(bin)/filter_out_ci 0 $(vocab)|$(bin)/filter_out_ci 0\
375
$(thesaurus) $(if $(wildcard $(word 4,$+)),|$(bin)/filter_out_ci 0 $(word 4,$+))\
376
|grep -vE -e '^"?:' -e 'UNUSED' >$@; exit 0 # grep exits nonzero if no match
377

    
378
termsSubdirs := $(importTables)
379

    
380
include $(root)/lib/mappings.Makefile
381

    
382
##### External dependencies
383

    
384
$(root)/%: _always
385
	+$(subMake)
386
.PRECIOUS: $(root)/% # let ext. dir's Makefile decide whether to delete on error
387

    
388
##### Mapping
389

    
390
+maps = $(filter %/map.csv %/VegBIEN.csv $(mappings)/%,$(+_))
391
map2db = env in_database=vegbien in_schema=$(datasrc) in_table=$*\
392
out_database=vegbien $(root)/map $(+maps)
393

    
394
##### Import to VegBIEN
395

    
396
import: $(importTables:%=%/import) _always ;
397

    
398
rm: _always
399
	echo "DELETE FROM source WHERE shortname = '$(datasrc)';"\
400
|"time" $(psqlAsBien)
401

    
402
reimport: _always rm import ;
403

    
404
profileTest = $(if $(profile),$(if $(test),1))
405
profileOnly = -env profile_to=/dev/fd/3 $(map2db) 3>&1 1>&2|\
406
$(bin)/profile_stats /dev/fd/0
407

    
408
log_ = $*/logs/$(if $(n),n=$(n).,)$(version).log.sql
409

    
410
# Displays the import log file path
411
# Run with `make -s` to avoid echoing make commands
412
%/log_file: _always
413
	echo $$(pwd)/$(log_)
414

    
415
trace = $(log_:.log.sql=.trace)
416
import = -$(if $(profileTest),$(profileOnly),(set -x; date; "time" env commit=1\
417
$(if $(profile),profile_to=$(trace)) $(map2db))$(if $(log), >>$(log_) 2>&1))
418
# don't abort on import errors, which often relate to invalid input data
419

    
420
import? = $(if $(call and,$(full_import),$(call dontImport,.)),,$(import))
421

    
422
%/import: %/VegBIEN.csv _always
423
	$(import?)
424
# default:
425
%/import: _always ;
426

    
427
#### Taxonomic scrubbing
428

    
429
scrub: _always
430
	$(selfMake) $(root)/scrub & echo $$!
431

    
432
# Removes TNRS taxondeterminations
433
unscrub: _always
434
	echo "SELECT delete_scrubbed_taxondeterminations('$(datasrc)');"|\
435
"time" env no_query_results=1 $(psqlAsBien)
436

    
437
rescrub: _always unscrub scrub ;
438

    
439
import_scrub: _always import scrub ;
440

    
441
reimport_scrub: _always reimport scrub ;
442

    
443
##### Log files from import
444

    
445
logs := $(wildcard */logs/*.log.sql */logs/*.trace)
446

    
447
rm_logs: _always
448
	$(RM) $(logs)
449

    
450
##### Verification of import
451

    
452
verifyTables := $(patsubst verify/%.ref,%,$(wildcard verify/*.ref))
453

    
454
verify: $(verifyTables:%=%/verify) _always ;
455

    
456
%/verify: verify/%.ref verify/%.out _always
457
	-$(diffVerbose) $(+_)
458
# don't abort on verification errors, which are expected during development
459
# default:
460
%/verify: verify/%.out _always
461
	$(if $(shell test -e $< && echo t),cat $<)
462
# don't run if verify/%.out's default do-nothing action was used
463
# can't use $(wildcard) because it won't recheck file after verify/%.out is run
464

    
465
psqlExport := "time" $(psqlNoSearchPath) --no-align --field-separator=$$'\t'\
466
--pset=footer=off --pset=null=NULL
467
# Note that using $(inDatasrc) will not work with datasources whose tables are
468
# the same name as VegBIEN tables (likely only VegBank), because the datasource
469
# is first in the search_path.
470
verify = $(if $(reverify),($(inDatasrc); cat $<)|$(psqlExport)\
471
--set=datasource="'$(datasrc)'" >$@)
472

    
473
verify/%.out: $(mappings)/verify.%.sql _always
474
	$(verify)
475
.PRECIOUS: verify/%.out # save partial output in case of error to help debugging
476
# default:
477
verify/%.out: _always ;
478

    
479
all += $(wildcard verify/*.out)
480

    
481
%.ref: %.ref.sql
482
	($(inDatasrc); cat $<)|$(psqlExport) >$@
483
.PRECIOUS: %.ref # there must always be a .ref for the make rules to work
484

    
485
##### Editing import
486

    
487
rename/%: _always
488
	echo "UPDATE source SET shortname = '$*' WHERE shortname = '$(datasrc)';"\
489
|$(psqlAsBien)
490

    
491
##### Testing
492

    
493
testRefOutput = $(subst .by_col,,$(1))
494
testRef = $(testRefOutput).ref
495
hasOwnRef = $(filter $@,$(call testRefOutput,$@))
496
# filter returns non-empty if they are equal
497

    
498
# `rm $@`: Remove outputs of successful tests to reduce clutter
499
# `$(foreach use_staged...)`: Run with use_staged=1
500
define runTest
501
@echo "Testing $(abspath $@)..."
502
>$@ env test=1 n=$(test_n) $(1) $(foreach use_staged,1,$(map2db))
503
$(if $(hasOwnRef),,-)@(set -x; $(diffIgnoreSpace) $(call testRef,$@) $@) 2>&1\
504
&& rm $@ || { e=$$?; $(if $(wildcard $(call testRef,$@)),,cat $@;)\
505
$(if $(hasOwnRef),\
506
{\
507
read -p $(emph)'Accept new test output? (y/n)'$(endEmph) REPLY;\
508
if test "$$REPLY" = y; then\
509
(set -x; $(MAKE) $@-ok --directory=$(realpath .) --makefile=../input.Makefile);\
510
exit 0;\
511
fi;\
512
};,\
513
echo $(emph)"Note: The preceding failed test is compared to another test's\
514
output"$(endEmph);\
515
echo $(emph)"When it fails, this always indicates a bug"$(endEmph);\
516
)\
517
exit $$e;}
518
endef
519

    
520
tests :=
521

    
522
%/test: %/test.xml _always ;
523

    
524
# Requires staging tables. To create them, run `make inputs/<datasrc>/install`.
525
# Non-flat-file inputs fall back to mimicking a successful test
526
%/test.xml: %/VegBIEN.csv _always
527
	$(if $(nonXml),$(call runTest,by_col=))
528
tests += %/test.xml
529

    
530
%/test.by_col.xml: %/VegBIEN.csv _always
531
	$(if $(nonXml),$(call runTest,by_col=1))
532

    
533
# Only run column-based tests if column-based mode enabled, because these tests
534
# are much slower than the row-based tests for small numbers of rows
535
ifneq ($(by_col),)
536
tests += %/test.by_col.xml
537
endif
538

    
539
testOutputs := $(foreach test,$(tests),$(importTables:%=$(test)))
540

    
541
.PRECIOUS: $(testOutputs) # save outputs of failed tests so they can be accepted
542

    
543
test: _always $(testOutputs) ;
544

    
545
all += $(wildcard %/test*.xml)
546

    
547
# Accepts a test output: make <test_output_path>-ok
548
%-ok: _always
549
	mv $* $(call testRef,$*)
550

    
551
accept-all: _always
552
	+yes|$(selfMake) test
553

    
554
##### Documentation
555

    
556
steps = $(selfMake) -s $*/import test=1 by_col=1 verbosity=2 n=100\
557
2>&1|$(bin)/debug2redmine >$@
558

    
559
%/logs/steps.by_col.log.sql: _always
560
	+$(steps)
(9-9/9)