Revision 924
Added by Aaron Marcuse-Kubitza almost 13 years ago
mappings/Makefile | ||
---|---|---|
2 | 2 |
|
3 | 3 |
bin := ../bin |
4 | 4 |
|
5 |
review = $(bin)/review <$(1) >for_review/$(1) |
|
6 |
|
|
5 | 7 |
coreMaps := DwC-VegBIEN.specimens.csv VegX-VegBIEN.organisms.csv |
6 |
chRootMaps := VegX-VegBIEN.plots.csv VegX-VegBIEN.stems.csv |
|
7 |
all := $(wildcard for_review/*) $(chRootMaps) |
|
8 | 8 |
|
9 | 9 |
##### General targets |
10 | 10 |
|
11 |
all: _always $(coreMaps) $(chRootMaps) |
|
12 |
./review |
|
11 |
all: _always $(coreMaps) ch_root_maps ; |
|
13 | 12 |
|
14 | 13 |
.SUFFIXES: |
15 | 14 |
|
... | ... | |
19 | 18 |
clean: _always |
20 | 19 |
$(RM) $(all) |
21 | 20 |
|
21 |
all := |
|
22 |
|
|
22 | 23 |
remake: _always clean all ; |
23 | 24 |
|
24 | 25 |
##### Core maps cleanup |
... | ... | |
28 | 29 |
$(bin)/in_place $< $(bin)/simplify_xpath |
29 | 30 |
$(bin)/in_place $< $(bin)/sort 1 0 |
30 | 31 |
touch $@ |
32 |
$(call review,$<) |
|
31 | 33 |
.PRECIOUS: .%.last_cleanup |
32 | 34 |
else |
33 | 35 |
$(coreMaps): _always |
... | ... | |
36 | 38 |
|
37 | 39 |
##### Maps generated with ch_root |
38 | 40 |
|
39 |
chRoot = $(bin)/ch_root <$< >$@ |
|
41 |
define chRoot |
|
42 |
$(bin)/ch_root <$< >$@ |
|
43 |
$(call review,$@) |
|
44 |
endef |
|
40 | 45 |
|
46 |
chRootMaps := |
|
47 |
|
|
41 | 48 |
VegX-VegBIEN.plots.csv: VegX-VegBIEN.organisms.csv |
42 | 49 |
env \ |
43 | 50 |
left_in_root='/*s/individualOrganismObservation/*ID->/*s/plotObservation' \ |
... | ... | |
45 | 52 |
right_in_root='/taxonoccurrence/*_id/locationevent' \ |
46 | 53 |
right_out_root='/locationevent' \ |
47 | 54 |
$(chRoot) |
55 |
chRootMaps += VegX-VegBIEN.plots.csv |
|
48 | 56 |
|
49 | 57 |
VegX-VegBIEN.stems.csv: VegX-VegBIEN.organisms.csv |
50 | 58 |
env \ |
... | ... | |
53 | 61 |
right_in_root='/taxonoccurrence/aggregateoccurrence/*_id/plantobservation/stemobservation' \ |
54 | 62 |
right_out_root='/stemobservation' \ |
55 | 63 |
$(chRoot) |
64 |
chRootMaps += VegX-VegBIEN.plots.csv |
|
65 |
|
|
66 |
ch_root_maps: $(chRootMaps) ; |
|
67 |
|
|
68 |
all += $(chRootMaps) |
Also available in: Unified diff
mappings/Makefile: Regenerate for_review maps automatically when a map changes