Revision 8157
Added by Aaron Marcuse-Kubitza almost 12 years ago
inputs/input.Makefile | ||
---|---|---|
247 | 247 |
echo 'SELECT * FROM "$(datasrc)"."$*" LIMIT 0;'|env no_search_path=1\ |
248 | 248 |
$(bin)/psql_script_vegbien --no-align --field-separator=, --pset=footer=off\ |
249 | 249 |
>$*/header.csv |
250 |
$(cleanup) |
|
251 | 250 |
endef |
252 | 251 |
|
253 | 252 |
# Don't try to edit a view. Must come before %/install to override it. |
... | ... | |
259 | 258 |
$(psqlNoSearchPath) --echo-all --set=schema='"$(datasrc)"' --set=table='"$*"' \ |
260 | 259 |
$(logInstall*) |
261 | 260 |
$(exportHeader) |
261 |
$(cleanup) |
|
262 | 262 |
.PRECIOUS: %/header.csv |
263 | 263 |
|
264 | 264 |
%.sql/run: _always |
... | ... | |
268 | 268 |
%/install: _always |
269 | 269 |
$(if $(nonXml),$(import_install_)) |
270 | 270 |
$(exportHeader) |
271 |
$(cleanup) |
|
271 | 272 |
define import_install_ |
272 | 273 |
(. $(bin)/vegbien_dest; unset schemas; "time" nice -n +5\ |
273 | 274 |
env schema=$(datasrc) table=$* $(bin)/csv2db $(catSrcs) $(logInstall*)) |
Also available in: Unified diff
inputs/input.Makefile: Moved $(cleanup) from $(exportHeader) to %/install because this is not part of exportHeader's functionality