1
|
coreMaps := DwC-VegBIEN.organisms.csv VegX-VegBIEN.organisms.csv
|
2
|
chRootMaps := VegX-VegBIEN.plots.csv VegX-VegBIEN.stems.csv
|
3
|
joinedMaps := $(filter-out DwC-% VegX-%,$(wildcard *-VegBIEN.*.csv))
|
4
|
all := $(wildcard for_review/*) $(joinedMaps) $(chRootMaps)
|
5
|
|
6
|
all: _always $(coreMaps) $(chRootMaps)
|
7
|
@#./join DwC VegBIEN
|
8
|
./join VegX VegBIEN
|
9
|
./review
|
10
|
|
11
|
.SUFFIXES:
|
12
|
|
13
|
_always:
|
14
|
.PHONY: _always
|
15
|
|
16
|
clean: _always
|
17
|
$(RM) $(all)
|
18
|
|
19
|
remake: _always clean all ;
|
20
|
|
21
|
#####
|
22
|
|
23
|
bin := ../bin
|
24
|
|
25
|
$(coreMaps): _always
|
26
|
$(bin)/in_place $@ $(bin)/simplify_xpath
|
27
|
$(bin)/in_place $@ $(bin)/sort 1 0
|
28
|
|
29
|
#####
|
30
|
|
31
|
chRoot = $(bin)/ch_root <$< >$@
|
32
|
|
33
|
VegX-VegBIEN.plots.csv: VegX-VegBIEN.organisms.csv
|
34
|
env \
|
35
|
left_in_root='/*s/individualOrganismObservation/*ID->/*s/plotObservation' \
|
36
|
left_out_root='/*s/plotObservation' \
|
37
|
right_in_root='/taxonoccurrence/*_id/locationevent' \
|
38
|
right_out_root='/locationevent' \
|
39
|
$(chRoot)
|
40
|
|
41
|
VegX-VegBIEN.stems.csv: VegX-VegBIEN.organisms.csv
|
42
|
env \
|
43
|
left_in_root='/*s/individualOrganismObservation->/*s/individualOrganismObservation[relatedItem[relationshipType=stemParent]/relatedItemID]' \
|
44
|
left_out_root='/*s/individualOrganismObservation[relatedItem[relationshipType=stemParent]/relatedItemID]' \
|
45
|
right_in_root='/taxonoccurrence/aggregateoccurrence/*_id/plantobservation/stemobservation' \
|
46
|
right_out_root='/stemobservation' \
|
47
|
$(chRoot)
|