Revision 6379
Added by Aaron Marcuse-Kubitza about 12 years ago
input.Makefile | ||
---|---|---|
96 | 96 |
$(make_script) |
97 | 97 |
.PRECIOUS: % # save partial outputs of aborted src make scripts |
98 | 98 |
|
99 |
##### SVN
|
|
99 |
##### Tables discovery
|
|
100 | 100 |
|
101 |
sortFile := import_order.txt |
|
101 | 102 |
noImportFile := _no_import |
102 | 103 |
|
104 |
dontImport = $(wildcard $(1)/$(noImportFile)) |
|
105 |
|
|
106 |
tables := $(if $(wildcard $(sortFile)),$(shell cat $(sortFile))) |
|
107 |
# $(shell) replaces "\n" with " " |
|
108 |
allSubdirs := $(call wildcard/,*/) |
|
109 |
allTables := $(call sortFilenames,$(filter-out _% verify logs,$(allSubdirs:%/=%))) |
|
110 |
joinedTables := $(filter-out $(tables),$(allTables)) |
|
111 |
allTables := $(strip $(joinedTables) $(tables))# move joined tables to beginning |
|
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 |
##### SVN |
|
119 |
|
|
103 | 120 |
svnFilesGlob:= */{,$(noImportFile),{,.}{map,*terms,VegBIEN}.csv{,.*},*header.*,*.sql,test*.xml*} |
104 | 121 |
svnFilesGlob := {map.csv,*{schema,~}*.sql,{,*/}*.make,$(svnFilesGlob)} |
105 | 122 |
_svnFilesGlob := {_MySQL/{,*schema*.sql,*.make},_src/*.{url,pdf}} |
... | ... | |
122 | 139 |
|
123 | 140 |
##### Existing maps discovery |
124 | 141 |
|
125 |
sortFile := import_order.txt |
|
126 |
|
|
127 |
dontImport = $(wildcard $(1)/$(noImportFile)) |
|
128 |
|
|
129 |
tables := $(if $(wildcard $(sortFile)),$(shell cat $(sortFile))) |
|
130 |
# $(shell) replaces "\n" with " " |
|
131 |
allSubdirs := $(call wildcard/,*/) |
|
132 |
allTables := $(call sortFilenames,$(filter-out _% verify logs,$(allSubdirs:%/=%))) |
|
133 |
joinedTables := $(filter-out $(tables),$(allTables)) |
|
134 |
allTables := $(strip $(joinedTables) $(tables))# move joined tables to beginning |
|
135 |
ifeq ($(tables),)# none specified in sort file |
|
136 |
tables := $(allTables) |
|
137 |
endif |
|
138 |
importTables := $(foreach table,$(tables),$(if\ |
|
139 |
$(call dontImport,$(table)),,$(table))) |
|
140 |
|
|
141 | 142 |
anyMap := %/map.csv %/VegBIEN.csv %/unmapped_terms.csv %/new_terms.csv |
142 | 143 |
|
143 | 144 |
extsFilter := $(addprefix %.,$(exts)) |
Also available in: Unified diff
input.Makefile: Existing maps discovery: Moved tables discovery to its own section, above SVN so it can be used by SVN