Project

General

Profile

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 4098 aaronmk
inputCoreMaps := Veg+.terms.csv Veg+-VegCore.csv VegCore-VegBIEN.csv \
9 4099 aaronmk
VegX-VegCore.csv
10 895 aaronmk
11 1272 aaronmk
# Commands
12
13 3810 aaronmk
review_ = $(bin)/review 1 <$(1) >for_review/$(1)
14 1115 aaronmk
review = $(call review_,$@)
15 924 aaronmk
16 785 aaronmk
##### General targets
17
18 4689 aaronmk
all: _always $(inputCoreMaps) ;
19 150 aaronmk
20 383 aaronmk
clean: _always
21 196 aaronmk
	$(RM) $(all)
22 188 aaronmk
23 924 aaronmk
all :=
24
25 785 aaronmk
##### Core maps cleanup
26 198 aaronmk
27 895 aaronmk
ifneq ($(filter .%.last_cleanup,$(MAKECMDGOALS)),)
28 3967 aaronmk
29
.Veg+.terms.csv.last_cleanup: .%.last_cleanup: %
30
	$(bin)/in_place $< $(bin)/sort_map
31
	touch $@
32
33 895 aaronmk
.%.last_cleanup: %
34 1132 aaronmk
	$(bin)/in_place $< $(bin)/sort_map
35 895 aaronmk
	touch $@
36 1115 aaronmk
	$(call review_,$<)
37 3967 aaronmk
38 895 aaronmk
else
39 1824 aaronmk
$(inputCoreMaps): _always
40 895 aaronmk
	$(MAKE) $(@:%=.%.last_cleanup)
41
endif