Project

General

Profile

1 3764 aaronmk
ifndef missingMappingsCmd
2
$(error $$(missingMappingsCmd) required)
3
endif
4 4610 aaronmk
ifndef termsSubdirs
5 4609 aaronmk
$(error $$(termsSubdirs) required)
6
endif
7 3764 aaronmk
8
missingMappingTypes = join non-empty_join input
9
10 4599 aaronmk
missing_mappings: _always $(missingMappingTypes:%=missing_%_mappings)\
11
unmapped_terms.csv new_terms.csv ;
12 3764 aaronmk
13
missingMappingsMsg = Missing $(*2Space) mappings:$(if\
14
$(filter join,$*), (indicates mapping to invalid location))
15
16
missing_%_mappings: _always # stem is one of $(missingMappingTypes)
17
	@echo $(emph)"$(missingMappingsMsg)"$(endEmph)
18
	@$(missingMappingsCmd)
19 4599 aaronmk
20 4605 aaronmk
catTerms = $(if $(+w),cat $(+w)|env -i sort -u >$@; $(bin)/autoremove $@)
21 4599 aaronmk
22
unmapped_terms.csv: $(termsSubdirs:%=%/unmapped_terms.csv)
23
	$(catTerms)
24
25
new_terms.csv: $(termsSubdirs:%=%/new_terms.csv)
26
	$(catTerms)