Project

General

Profile

« Previous | Next » 

Revision 6363

input.Makefile: Staging tables installation: Moved .sql export downloading and translation to separate Input data retrieval section

View differences:

inputs/input.Makefile
177 177
%/cat: _always
178 178
	$(catSrcs)
179 179

  
180
##### Input data retrieval
181

  
182
# Must come before `%.sql: _MySQL/%.sql` to override it
183
%.sql: %.sql.make
184
	$(make_script)
185

  
186
# The export must be created with:
187
# `--compatible=postgresql --add-locks=false --set-charset --no-create-info`
188
# Must come before `%.sql: _MySQL/%.sql` to override it
189
%.data.sql: _MySQL/%.data.sql
190
	$(if $(wildcard $@),,$(bin)/my2pg.data <$< >$@)
191

  
192
# The export must be created with:
193
# `--compatible=postgresql --add-locks=false --set-charset`
194
# Add `--no-data` to create a schema-only export.
195
%.sql: _MySQL/%.sql
196
	$(if $(wildcard $@),,$(bin)/my2pg <$< >$@)
197

  
180 198
##### Staging tables installation
181 199

  
182 200
srcTable := %.src
......
219 237
	($(inDatasrc); cat $+|pg_dump_limit)|"time" $(psqlNoSearchPath) \
220 238
--set=schema='"$(datasrc)"' $(logInstallRoot)
221 239

  
222
# Must come before `%.sql: _MySQL/%.sql` to override it
223
%.sql: %.sql.make
224
	$(make_script)
225

  
226
# The export must be created with:
227
# `--compatible=postgresql --add-locks=false --set-charset --no-create-info`
228
# Must come before `%.sql: _MySQL/%.sql` to override it
229
%.data.sql: _MySQL/%.data.sql
230
	$(if $(wildcard $@),,$(bin)/my2pg.data <$< >$@)
231

  
232
# The export must be created with:
233
# `--compatible=postgresql --add-locks=false --set-charset`
234
# Add `--no-data` to create a schema-only export.
235
%.sql: _MySQL/%.sql
236
	$(if $(wildcard $@),,$(bin)/my2pg <$< >$@)
237

  
238 240
cleanup = $(if $(wildcard $*/cleanup.sql),($(inDatasrc); cat $*/cleanup.sql)\
239 241
|"time" $(psqlNoSearchPath) --echo-all --set=table='"$*"' $(logInstall*Add),\
240 242
(prefix=; . $(bin)/vegbien_dest; unset schemas; env schema=$(datasrc) table=$*\

Also available in: Unified diff