Project

General

Profile

« Previous | Next » 

Revision 4121

input.Makefile: Merged Installation and Staging tables sections into Staging tables installation, since no other installation is performed. Removed "import/" prefix from non-file import-related targets.

View differences:

input.Makefile
144 144
cat-%: _always
145 145
	$(catSrcs)
146 146

  
147
##### Installation
147
##### Staging tables installation
148 148

  
149
install: _always import/install ;
149
install: _always schema $(addprefix install-,$(tables)) ;
150 150

  
151
uninstall: _always import/uninstall ;
151
uninstall: _always rm_schema ;
152
# rm_schema will also drop all staging tables
152 153

  
153 154
reinstall: _always uninstall install ;
154 155

  
155
##### Staging tables
156

  
157
import/install: _always import/schema $(addprefix import/install-,$(tables)) ;
158

  
159
import/uninstall: _always import/rm_schema ;
160
# rm_schema will also drop all staging tables
161

  
162
import/schema: _always
156
schema: _always
163 157
	-echo 'CREATE SCHEMA "$(datasrc)";'|$(psqlAsBien)
164 158
# ignore errors if schema exists
165 159

  
166
import/rm_schema: _always
160
rm_schema: _always
167 161
	echo 'DROP SCHEMA IF EXISTS "$(datasrc)" CASCADE;'|$(psqlAsBien)
168 162

  
169
import/install-%: _always
163
install-%: _always
170 164
	$(if $(isCsv),$(import_install_))
171 165
import_install_ = (prefix=; . $(bin)/vegbien_dest; "time" nice -n +5\
172 166
env schema=$(datasrc) table=$* $(bin)/csv2db $(catSrcs)\
......
311 305

  
312 306
##### Editing import
313 307

  
314
import/rotate: _always
308
rotate: _always
315 309
	echo "UPDATE party SET organizationname = organizationname||'.$(date)'\
316 310
WHERE organizationname = '$(datasrc)';"|$(psqlAsBien)
317 311

  
318
import/rm: _always
312
rm: _always
319 313
	echo "DELETE FROM party WHERE organizationname = '$(datasrc)';"|\
320 314
$(psqlAsBien)
321 315

  

Also available in: Unified diff