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
# used to filter the output of embedded $(shell make ...) invocations
36
filter_make := grep -vF -e lib -e ".Makefile'."
37
addBeforeExt = $(basename $(2))$(1)$(suffix $(2))
38

    
39
# Terminal
40
termCols := $(shell tput cols)
41

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

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

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

    
65
##### Environment
66

    
67
export PATH := $(bin):$(PATH)
68

    
69
##### General targets
70

    
71
all: _always maps ;
72

    
73
clean: _always
74
	$(RM) $(all)
75

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

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

    
86
%/: %/map.csv _always ;
87

    
88
%/: % _always ;
89

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

    
94
##### Tables discovery
95

    
96
sortFile := import_order.txt
97
noImportFile := _no_import
98

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

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

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

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

    
125
##### SVN
126

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

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

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

    
149
##### Existing maps discovery
150

    
151
anyMap := %/map.csv %/VegBIEN.csv %/unmapped_terms.csv %/new_terms.csv
152

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

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

    
160
srcDict := map.csv
161

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

    
166
viaMaps := $(importTables:%=%/map.csv)
167

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

    
172
##### Sources
173

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

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

    
188
%/cat: _always
189
	$(catSrcs)
190

    
191
##### Input data retrieval
192

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

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

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

    
209
##### Staging tables installation
210

    
211
srcTable := %.src
212

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

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

    
223
install: _always schema $(allInstalls:%=%/install) ;
224

    
225
uninstall: _always confirm_rm_schema rm_schema ;
226
# rm_schema will also drop all staging tables
227

    
228
reinstall: _always uninstall install ;
229

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

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

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

    
241
installLog := logs/install.log.sql
242

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

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

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

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

    
265
exportHeader = $(selfMake) $*/header.csv
266

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

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

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

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

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

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

    
309
%/reinstall: _always %/uninstall %/install ;
310

    
311
postprocess: _always $(allTables:%=%/postprocess) ;
312

    
313
cleanup: _always $(tables:%=%/cleanup) ;
314

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

    
320
##### Maps building
321

    
322
# Maps to (try to) build are added to this
323
maps :=
324

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

    
329
translate = $(if $(wildcard $(1)),$(bin)/in_place $< $(bin)/translate_ci 1 $(1))
330

    
331
$(srcDict):# empty target in case it doesn't exist
332

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

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

    
360
maps: $(maps) _always ;
361

    
362
all += $(maps)
363

    
364
##### Maps validation
365

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

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

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

    
380
termsSubdirs := $(importTables)
381

    
382
include $(root)/lib/mappings.Makefile
383

    
384
##### External dependencies
385

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

    
390
##### Mapping
391

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

    
396
##### Import to VegBIEN
397

    
398
import: $(importTables:%=%/import) _always ;
399

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

    
404
reimport: _always rm import ;
405

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

    
410
log_ = $*/logs/$(if $(n),n=$(n).,)$(version).log.sql
411

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

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

    
422
import? = $(if $(call and,$(full_import),$(call dontImport,.)),,$(import))
423

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

    
429
#### Taxonomic scrubbing
430

    
431
scrub: _always
432
	$(selfMake) $(root)/scrub & echo $$!
433

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

    
439
rescrub: _always unscrub scrub ;
440

    
441
import_scrub: _always import scrub ;
442

    
443
reimport_scrub: _always reimport scrub ;
444

    
445
##### Log files from import
446

    
447
logs := $(wildcard */logs/*.log.sql */logs/*.trace)
448

    
449
rm_logs: _always
450
	$(RM) $(logs)
451

    
452
##### Verification of import
453

    
454
verifyTables := $(patsubst verify/%.ref,%,$(wildcard verify/*.ref))
455

    
456
verify: $(verifyTables:%=%/verify) _always ;
457

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

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

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

    
481
all += $(wildcard verify/*.out)
482

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

    
487
##### Editing import
488

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

    
493
##### Testing
494

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

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

    
522
tests :=
523

    
524
%/test: %/test.xml _always ;
525

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

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

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

    
541
testOutputs := $(foreach test,$(tests),$(importTables:%=$(test)))
542

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

    
545
test: _always $(testOutputs) ;
546

    
547
all += $(wildcard %/test*.xml)
548

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

    
553
accept-all: _always
554
	+yes|$(selfMake) test
555

    
556
##### Documentation
557

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

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