Project

General

Profile

« Previous | Next » 

Revision 8238

inputs/input.Makefile: %/postprocess.sql/run: Factored out into separate %/postprocess command, which can eventually also perform other actions

View differences:

input.Makefile
251 251
# Don't try to edit a view. Must come before %/install to override it.
252 252
%_view/install: _always ;
253 253

  
254
%.sql/run: _always
255
	$(if $(wildcard $(@D)),($(inDatasrc); cat $(@D))|(cd '$(*D)';\
256
"time" env no_search_path=1 ../$(bin)/psql_verbose_vegbien \
257
--set=table='"$(*D)"' --set=table_str=\''"$(*D)"'\'))
258

  
259
%/postprocess: _always %/postprocess.sql/run ;
260

  
254 261
# For staging tables which are derived by joining together other staging tables.
255 262
%/install %/header.csv: %/create.sql _always
256 263
	($(inDatasrc); echo 'CREATE TABLE "$*" AS'; cat $<; echo ';')|"time" \
257 264
$(psqlNoSearchPath) --echo-all --set=schema='"$(datasrc)"' --set=table='"$*"' \
258 265
$(logInstall*)
259
	$(selfMake) $*/postprocess.sql/run
266
	$(selfMake) $*/postprocess
260 267
	$(exportHeader)
261 268
	$(cleanup)
262 269
.PRECIOUS: %/header.csv
263 270

  
264
%.sql/run: _always
265
	$(if $(wildcard $(@D)),($(inDatasrc); cat $(@D))|(cd '$(*D)';\
266
"time" env no_search_path=1 ../$(bin)/psql_verbose_vegbien \
267
--set=table='"$(*D)"' --set=table_str=\''"$(*D)"'\'))
268

  
269 271
%/install: _always
270 272
	$(if $(nonXml),$(import_install_))
271
	$(selfMake) $*/postprocess.sql/run
273
	$(selfMake) $*/postprocess
272 274
	$(exportHeader)
273 275
	$(cleanup)
274 276
define import_install_

Also available in: Unified diff