Project

General

Profile

« Previous | Next » 

Revision 4543

input.Makefile: Staging tables installation: Factored $(call logInstall,$*/) out into $(logInstall*)

View differences:

input.Makefile
194 194
	echo 'DROP SCHEMA IF EXISTS "$(datasrc)" CASCADE;'|$(psqlAsBien)
195 195

  
196 196
logInstall = $(if $(log),$(if $(quiet),&>,2>&1|tee )$(1)logs/install.log.sql)
197
logInstall* = $(call logInstall,$*/)
197 198

  
198 199
# Must come before %/install to override it
199 200
sql/install: $(dbExports)
......
224 225
# For staging tables which are derived by joining together other staging tables.
225 226
%/install %/header.csv: %/create.sql _always
226 227
	($(inDatasrc); echo 'CREATE TABLE "$*" AS'; cat $<; echo ';')|"time" \
227
$(psqlAsBien) --echo-all --set=table='"$*"' $(call logInstall,$*/)
228
$(psqlAsBien) --echo-all --set=table='"$*"' $(logInstall*)
228 229
	-echo 'ALTER TABLE "$(datasrc)"."$*" \
229 230
ADD COLUMN row_num serial NOT NULL PRIMARY KEY;'|$(psqlAsBien)
230 231
	echo 'VACUUM ANALYZE "$(datasrc)"."$*";'|$(psqlAsBien)
......
240 241
	$(if $(isRef),$(exportHeader),$(if $(nonXml),$(import_install_)))
241 242
import_install_ = (prefix=; . $(bin)/vegbien_dest; "time" nice -n +5\
242 243
env schema=$(datasrc) table=$* has_row_num=$(hasRowNum) $(bin)/csv2db\
243
$(catSrcs) $(call logInstall,$*/))
244
$(catSrcs) $(logInstall*))
244 245

  
245 246
##### Maps building
246 247

  

Also available in: Unified diff