Project

General

Profile

1
all: FORCE VegBank-VegBIEN
2
	$(MAKE) plots
3
	./join VegX VegBank
4
	./join VegX VegBIEN
5
	./review
6

    
7
FORCE:
8

    
9
all =\
10
$(wildcard for_review/*.csv) \
11
$(filter-out VegX-% VegBank-%,$(wildcard *-VegBank.*.csv)) \
12
VegX-*.plots.csv VegX-VegBIEN.organisms.csv schemas/vegbien.sql
13

    
14
clean: FORCE
15
	$(RM) $(all)
16

    
17

    
18
VegBank-VegBIEN: schemas/vegbien.sql VegX-VegBIEN.organisms.csv
19

    
20
repl = ../scripts/util/repl <$< VegBank-VegBIEN.csv$(if $(filter %.csv,$<), 1) \
21
>$@
22

    
23
schemas/vegbien.sql: schemas/vegbank.sql
24
	$(repl)
25

    
26
VegX-VegBIEN.organisms.csv: VegX-VegBank.organisms.csv
27
	$(repl)
28

    
29

    
30
plots: $(subst .organisms.,.plots.,$(wildcard VegX-*.organisms.csv))
31

    
32
chRoot = ../scripts/util/ch_root <$< >$@
33

    
34
chRoot2PlotsLeftVegx =\
35
	env \
36
	left_in_root='/*s/individualOrganismObservation/*ID->/*s/plotObservation' \
37
	left_out_root='/*s/plotObservation' \
38
	$(chRoot)
39

    
40
VegX-VegBank.plots.csv: VegX-VegBank.organisms.csv
41
	$(chRoot2PlotsVegxVegbank)
42
chRoot2PlotsVegxVegbank =\
43
	env \
44
	right_in_root='/taxonObservation/*_ID/observation' \
45
	right_out_root='/observation' \
46
	$(chRoot2PlotsLeftVegx)
47

    
48
VegX-VegBIEN.plots.csv: VegX-VegBIEN.organisms.csv
49
	$(chRoot2PlotsVegxVegbien)
50
chRoot2PlotsVegxVegbien =\
51
	env \
52
	right_in_root='/taxonoccurrence/*_ID/plotevent' \
53
	right_out_root='/plotevent' \
54
	$(chRoot2PlotsLeftVegx)
(1-1/23)