Revision 223
Added by Aaron Marcuse-Kubitza about 13 years ago
Makefile | ||
---|---|---|
1 |
all: FORCE VegBank-VegBIEN |
|
1 |
misc = schemas/vegbien.sql schemas/vegbien_empty.sql VegX-VegBIEN.organisms.csv |
|
2 |
|
|
3 |
all: FORCE $(misc) |
|
2 | 4 |
$(MAKE) plots |
3 | 5 |
./join VegX VegBank |
4 | 6 |
./join VegX VegBIEN |
5 | 7 |
./review |
8 |
.PRECIOUS: $(misc) |
|
6 | 9 |
|
10 |
.SUFFIXES: |
|
11 |
|
|
7 | 12 |
FORCE: |
13 |
.PHONY: FORCE |
|
8 | 14 |
|
9 | 15 |
all =\ |
10 | 16 |
$(wildcard for_review/*.csv) \ |
11 | 17 |
$(filter-out VegX-% VegBank-%,$(wildcard *-VegBank.*.csv)) \ |
12 |
VegX-*.plots.csv VegX-VegBIEN.organisms.csv schemas/vegbien.sql
|
|
18 |
VegX-*.plots.csv $(misc)
|
|
13 | 19 |
|
14 | 20 |
clean: FORCE |
15 | 21 |
$(RM) $(all) |
16 | 22 |
|
23 |
repl = ../scripts/util/repl |
|
17 | 24 |
sort = ../scripts/util/sort 1 0 |
18 |
repl = ../scripts/util/repl |
|
19 | 25 |
chRoot = ../scripts/util/ch_root <$< >$@ |
26 |
empty = sed -nE 's/^CREATE TABLE ([0-9A-Za-z_]+) \($$/TRUNCATE \1 CASCADE;/p' \ |
|
27 |
<$< >$@ |
|
20 | 28 |
|
21 | 29 |
|
22 |
VegBank-VegBIEN: schemas/vegbien.sql VegX-VegBIEN.organisms.csv |
|
23 |
|
|
24 | 30 |
schemas/vegbien.sql: schemas/vegbank.sql |
25 | 31 |
$(repl) <$< VegBank-VegBIEN.schema.csv|$(repl) VegBank-VegBIEN.csv >$@ |
26 | 32 |
|
33 |
schemas/vegbien_empty.sql: schemas/vegbien.sql |
|
34 |
$(empty) |
|
35 |
|
|
27 | 36 |
VegX-VegBIEN.organisms.csv: VegX-VegBank.organisms.csv |
28 | 37 |
$(repl) <$< VegBank-VegBIEN.csv 1|$(sort) >$@ |
29 | 38 |
|
30 | 39 |
|
31 |
plots: $(subst .organisms.,.plots.,$(wildcard VegX-*.organisms.csv)) |
|
40 |
plots: FORCE $(subst .organisms.,.plots.,$(wildcard VegX-*.organisms.csv))
|
|
32 | 41 |
|
33 | 42 |
chRoot2PlotsLeftVegx =\ |
34 | 43 |
env \ |
Also available in: Unified diff
Added auto-generated vegbien_empty.sql to empty the vegbien db