Project

General

Profile

« Previous | Next » 

Revision 356

Generate VegBank-VegBIEN.schema.csv from VegBank-VegBIEN.schema_only.csv and VegBank-VegBIEN.csv

View differences:

Makefile
32 32

  
33 33
bin = ../bin
34 34
in_place = $(bin)/in_place
35
cat_csv = $(bin)/cat_csv
35 36
repl = $(bin)/repl
36 37
sort = $(bin)/sort 1 0
37 38
chRoot = $(bin)/ch_root <$< >$@
38 39
empty = $(SED) -n \
39 40
's/^CREATE TABLE ([0-9A-Za-z_]+) \($$/TRUNCATE \1 CASCADE;/p' <$< >$@
40 41

  
42
VegBank-VegBIEN.%.csv: VegBank-VegBIEN.csv VegBank-VegBIEN.%_only.csv
43
	$(bin)/cat_csv <$+ >$@
44
.PRECIOUS: VegBank-VegBIEN.%.csv
45

  
41 46
schemas/vegbien.sql: schemas/vegbank.sql
42
	$(repl) <$< VegBank-VegBIEN.schema.csv|$(repl) VegBank-VegBIEN.csv >$@
47
	$(repl) <$< VegBank-VegBIEN.schema.csv >$@
43 48

  
44 49
schemas/vegbien_empty.sql: schemas/vegbien.sql
45 50
	$(empty)

Also available in: Unified diff