Project

General

Profile

« Previous | Next » 

Revision 6156

input.Makefile: Import to VegBIEN: Added support for tables which should be installed but not imported, but which must be installed after tables which are imported rather than before. This currently applies to geoscrub.geoscrub_cultivated, which depends on geoscrub_cleaned_unique (and therefore must be installed after it), but which should not be imported because it's used directly as a lookup table by analytical_stem.

View differences:

inputs/input.Makefile
101 101

  
102 102
##### SVN
103 103

  
104
svnFilesGlob:= */{,{,.}{map,*terms,VegBIEN}.csv{,.*},*header.*,*.sql,test*.xml*}
104
noImportFile := _no_import
105

  
106
svnFilesGlob:= */{,$(noImportFile),{,.}{map,*terms,VegBIEN}.csv{,.*},*header.*,*.sql,test*.xml*}
105 107
svnFilesGlob := {map.csv,*{schema,~}*.sql,{,*/}*.make,$(svnFilesGlob)}
106 108
_svnFilesGlob := {_MySQL/{,*schema*.sql,*.make},_src/*.{url,pdf}}
107 109
svnFiles = $(filter-out _% logs/%,$(call wildcard/,$(svnFilesGlob)))\
......
125 127

  
126 128
sortFile := import_order.txt
127 129

  
130
dontImport = $(wildcard $(1)/$(noImportFile))
131

  
128 132
tables := $(if $(wildcard $(sortFile)),$(shell cat $(sortFile)))
129 133
    # $(shell) replaces "\n" with " "
130 134
allSubdirs := $(call wildcard/,*/)
......
134 138
ifeq ($(tables),)# none specified in sort file
135 139
tables := $(allTables)
136 140
endif
141
importTables := $(foreach table,$(tables),$(if\
142
$(call dontImport,$(table)),,$(table)))
137 143

  
138 144
anyMap := %/map.csv %/VegBIEN.csv %/unmapped_terms.csv %/new_terms.csv
139 145

  
......
365 371
$(if $(n),,&>$(log_)))$(if $(log),$(if $(n), 2>&1|tee -a $(log_))))
366 372
# don't abort on import errors, which often relate to invalid input data
367 373

  
368
import: $(tables:%=%/import) _always ;
374
import: $(importTables:%=%/import) _always ;
369 375

  
370 376
%/import: %/VegBIEN.csv _always
371 377
	$(import)

Also available in: Unified diff