1 |
3793
|
aaronmk
|
include ../lib/common.Makefile
|
2 |
|
|
|
3 |
|
|
|
4 |
785
|
aaronmk
|
##### Vars/functions
|
5 |
|
|
|
6 |
1272
|
aaronmk
|
# Paths
|
7 |
895
|
aaronmk
|
bin := ../bin
|
8 |
4889
|
aaronmk
|
inputCoreMaps := VegCore.csv Veg+-VegCore.csv VegCore-VegBIEN.csv \
|
9 |
|
|
VegX-VegCore.csv
|
10 |
895
|
aaronmk
|
|
11 |
785
|
aaronmk
|
##### General targets
|
12 |
|
|
|
13 |
4689
|
aaronmk
|
all: _always $(inputCoreMaps) ;
|
14 |
150
|
aaronmk
|
|
15 |
383
|
aaronmk
|
clean: _always
|
16 |
196
|
aaronmk
|
$(RM) $(all)
|
17 |
188
|
aaronmk
|
|
18 |
924
|
aaronmk
|
all :=
|
19 |
|
|
|
20 |
785
|
aaronmk
|
##### Core maps cleanup
|
21 |
198
|
aaronmk
|
|
22 |
5045
|
aaronmk
|
# This tracks VegCore terms that are mapped to VegBIEN but not documented in
|
23 |
|
|
# VegCore.csv. This file is *not* svn:ignored, so it will show up with a ? when
|
24 |
|
|
# the user runs `svn st` if there are any unsourced terms.
|
25 |
|
|
VegCore-VegBIEN.unsourced_terms.csv: VegCore-VegBIEN.csv VegCore.csv
|
26 |
|
|
$(bin)/filter_out_ci 0 <$+ >$@
|
27 |
|
|
$(bin)/autoremove $@
|
28 |
|
|
|
29 |
895
|
aaronmk
|
ifneq ($(filter .%.last_cleanup,$(MAKECMDGOALS)),)
|
30 |
3967
|
aaronmk
|
|
31 |
4850
|
aaronmk
|
.VegCore.csv.last_cleanup: .%.last_cleanup: %
|
32 |
|
|
$(bin)/in_place $< $(bin)/sort 2 0
|
33 |
|
|
touch $@
|
34 |
5046
|
aaronmk
|
$(MAKE) VegCore-VegBIEN.unsourced_terms.csv
|
35 |
4850
|
aaronmk
|
|
36 |
4891
|
aaronmk
|
.Veg+-VegCore.csv.last_cleanup .VegX-VegCore.csv.last_cleanup: \
|
37 |
|
|
.%.last_cleanup: %
|
38 |
4890
|
aaronmk
|
$(bin)/in_place $< $(bin)/sort_map
|
39 |
|
|
touch $@
|
40 |
|
|
|
41 |
4892
|
aaronmk
|
.VegCore-VegBIEN.csv.last_cleanup: .%.last_cleanup: %
|
42 |
1132
|
aaronmk
|
$(bin)/in_place $< $(bin)/sort_map
|
43 |
895
|
aaronmk
|
touch $@
|
44 |
4692
|
aaronmk
|
$(bin)/review 1 <$< >for_review/$<
|
45 |
5045
|
aaronmk
|
$(MAKE) VegCore-VegBIEN.unsourced_terms.csv
|
46 |
3967
|
aaronmk
|
|
47 |
895
|
aaronmk
|
else
|
48 |
1824
|
aaronmk
|
$(inputCoreMaps): _always
|
49 |
895
|
aaronmk
|
$(MAKE) $(@:%=.%.last_cleanup)
|
50 |
|
|
endif
|