Project

General

Profile

1 3793 aaronmk
include ../lib/common.Makefile
2
3
4 785 aaronmk
##### Vars/functions
5
6 3823 aaronmk
# Make
7
SHELL := /bin/bash
8
9 1272 aaronmk
# Paths
10 895 aaronmk
bin := ../bin
11 4098 aaronmk
inputCoreMaps := Veg+.terms.csv Veg+-VegCore.csv VegCore-VegBIEN.csv \
12 4099 aaronmk
VegX-VegCore.csv
13 895 aaronmk
14 1272 aaronmk
# Commands
15
16 3810 aaronmk
review_ = $(bin)/review 1 <$(1) >for_review/$(1)
17 1115 aaronmk
review = $(call review_,$@)
18 924 aaronmk
19 785 aaronmk
##### General targets
20
21 4688 aaronmk
all: _always $(inputCoreMaps) vegcsv_maps ;
22 150 aaronmk
23 383 aaronmk
clean: _always
24 196 aaronmk
	$(RM) $(all)
25 188 aaronmk
26 924 aaronmk
all :=
27
28 785 aaronmk
##### Core maps cleanup
29 198 aaronmk
30 895 aaronmk
ifneq ($(filter .%.last_cleanup,$(MAKECMDGOALS)),)
31 3967 aaronmk
32
.Veg+.terms.csv.last_cleanup: .%.last_cleanup: %
33
	$(bin)/in_place $< $(bin)/sort_map
34
	touch $@
35
36 895 aaronmk
.%.last_cleanup: %
37 1132 aaronmk
	$(bin)/in_place $< $(bin)/sort_map
38 895 aaronmk
	touch $@
39 1115 aaronmk
	$(call review_,$<)
40 3967 aaronmk
41 895 aaronmk
else
42 1824 aaronmk
$(inputCoreMaps): _always
43 895 aaronmk
	$(MAKE) $(@:%=.%.last_cleanup)
44
endif
45 350 aaronmk
46 4088 aaronmk
##### VegCSV
47 1115 aaronmk
48 4088 aaronmk
vegcsvMaps :=
49 1115 aaronmk
50 3823 aaronmk
vegcsv_maps: _always $(vegcsvMaps) ;
51
52
all += $(vegcsvMaps)