Revision 4688
Added by Aaron Marcuse-Kubitza over 12 years ago
Makefile | ||
---|---|---|
11 | 11 |
inputCoreMaps := Veg+.terms.csv Veg+-VegCore.csv VegCore-VegBIEN.csv \ |
12 | 12 |
VegX-VegCore.csv |
13 | 13 |
|
14 |
# Via formats |
|
15 |
coreMaps := $(wildcard *-VegBIEN.csv) |
|
16 |
filenameVia = $(shell echo '$(1)'|grep --only-matching --extended-regexp\ |
|
17 |
'^[a-zA-Z+]+') |
|
18 |
# can't use --ignore-case because in Mac grep, a bug causes it to break [] exprs |
|
19 |
vias := $(strip $(sort $(foreach coreMap,$(coreMaps),$(call\ |
|
20 |
filenameVia,$(coreMap))))) |
|
21 |
|
|
22 | 14 |
# Commands |
23 | 15 |
|
24 | 16 |
review_ = $(bin)/review 1 <$(1) >for_review/$(1) |
25 | 17 |
review = $(call review_,$@) |
26 | 18 |
|
27 |
join = env header_num=0 $(bin)/join_union_sort |
|
28 |
selfMap_ = $(bin)/cols 0 0 |
|
29 |
mkSelfMap = $(selfMap_) <$<|$(bin)/sort_map >$@ |
|
30 |
|
|
31 | 19 |
##### General targets |
32 | 20 |
|
33 |
all: _always $(inputCoreMaps) vegcsv_maps self_maps ;
|
|
21 |
all: _always $(inputCoreMaps) vegcsv_maps ; |
|
34 | 22 |
|
35 | 23 |
clean: _always |
36 | 24 |
$(RM) $(all) |
... | ... | |
55 | 43 |
$(MAKE) $(@:%=.%.last_cleanup) |
56 | 44 |
endif |
57 | 45 |
|
58 |
##### Self maps |
|
59 |
|
|
60 |
selfMaps := |
|
61 |
|
|
62 |
viaCoreMap = $(via)-VegBIEN.csv |
|
63 |
viaSelfMap = $(via).self.csv |
|
64 |
viaCoreMaps = $(wildcard $(subst %,*,$(viaCoreMap))) |
|
65 |
|
|
66 |
define selfMapTargets |
|
67 |
selfMaps += $(viaCoreMaps:$(viaCoreMap)=$(viaSelfMap)) |
|
68 |
|
|
69 |
$(viaSelfMap): $(viaCoreMap) |
|
70 |
$$(mkSelfMap) |
|
71 |
endef |
|
72 |
$(foreach via,$(vias),$(eval $(selfMapTargets))) |
|
73 |
|
|
74 |
ifneq ($(filter self_maps,$(MAKECMDGOALS)),) |
|
75 |
self_maps: _always $(selfMaps) ; |
|
76 |
else |
|
77 |
self_maps: _always |
|
78 |
$(MAKE) self_maps |
|
79 |
# re-run make so that cache of existing files for $(viaCoreMaps) is reset |
|
80 |
endif |
|
81 |
|
|
82 |
all += $(selfMaps) |
|
83 |
|
|
84 | 46 |
##### VegCSV |
85 | 47 |
|
86 | 48 |
vegcsvMaps := |
Also available in: Unified diff
mappings/Makefile: Removed no longer used self maps, because the new automapping mechanism does not use them