1 |
785
|
aaronmk
|
##### Vars/functions
|
2 |
|
|
|
3 |
895
|
aaronmk
|
bin := ../bin
|
4 |
|
|
|
5 |
748
|
aaronmk
|
coreMaps := DwC-VegBIEN.specimens.csv VegX-VegBIEN.organisms.csv
|
6 |
744
|
aaronmk
|
chRootMaps := VegX-VegBIEN.plots.csv VegX-VegBIEN.stems.csv
|
7 |
882
|
aaronmk
|
all := $(wildcard for_review/*) $(chRootMaps)
|
8 |
744
|
aaronmk
|
|
9 |
785
|
aaronmk
|
##### General targets
|
10 |
|
|
|
11 |
744
|
aaronmk
|
all: _always $(coreMaps) $(chRootMaps)
|
12 |
199
|
aaronmk
|
./review
|
13 |
150
|
aaronmk
|
|
14 |
223
|
aaronmk
|
.SUFFIXES:
|
15 |
|
|
|
16 |
383
|
aaronmk
|
_always:
|
17 |
|
|
.PHONY: _always
|
18 |
188
|
aaronmk
|
|
19 |
383
|
aaronmk
|
clean: _always
|
20 |
196
|
aaronmk
|
$(RM) $(all)
|
21 |
188
|
aaronmk
|
|
22 |
423
|
aaronmk
|
remake: _always clean all ;
|
23 |
|
|
|
24 |
785
|
aaronmk
|
##### Core maps cleanup
|
25 |
198
|
aaronmk
|
|
26 |
895
|
aaronmk
|
ifneq ($(filter .%.last_cleanup,$(MAKECMDGOALS)),)
|
27 |
|
|
.%.last_cleanup: %
|
28 |
|
|
$(bin)/in_place $< $(bin)/simplify_xpath
|
29 |
|
|
$(bin)/in_place $< $(bin)/sort 1 0
|
30 |
|
|
touch $@
|
31 |
779
|
aaronmk
|
.PRECIOUS: .%.last_cleanup
|
32 |
895
|
aaronmk
|
else
|
33 |
|
|
$(coreMaps): _always
|
34 |
|
|
$(MAKE) $(@:%=.%.last_cleanup)
|
35 |
|
|
endif
|
36 |
350
|
aaronmk
|
|
37 |
785
|
aaronmk
|
##### Maps generated with ch_root
|
38 |
212
|
aaronmk
|
|
39 |
744
|
aaronmk
|
chRoot = $(bin)/ch_root <$< >$@
|
40 |
197
|
aaronmk
|
|
41 |
438
|
aaronmk
|
VegX-VegBIEN.plots.csv: VegX-VegBIEN.organisms.csv
|
42 |
188
|
aaronmk
|
env \
|
43 |
439
|
aaronmk
|
left_in_root='/*s/individualOrganismObservation/*ID->/*s/plotObservation' \
|
44 |
|
|
left_out_root='/*s/plotObservation' \
|
45 |
525
|
aaronmk
|
right_in_root='/taxonoccurrence/*_id/locationevent' \
|
46 |
|
|
right_out_root='/locationevent' \
|
47 |
439
|
aaronmk
|
$(chRoot)
|
48 |
|
|
|
49 |
|
|
VegX-VegBIEN.stems.csv: VegX-VegBIEN.organisms.csv
|
50 |
|
|
env \
|
51 |
441
|
aaronmk
|
left_in_root='/*s/individualOrganismObservation->/*s/individualOrganismObservation[relatedItem[relationshipType=stemParent]/relatedItemID]' \
|
52 |
504
|
aaronmk
|
left_out_root='/*s/individualOrganismObservation[relatedItem[relationshipType=stemParent]/relatedItemID]' \
|
53 |
681
|
aaronmk
|
right_in_root='/taxonoccurrence/aggregateoccurrence/*_id/plantobservation/stemobservation' \
|
54 |
673
|
aaronmk
|
right_out_root='/stemobservation' \
|
55 |
439
|
aaronmk
|
$(chRoot)
|