Project

General

Profile

1
ifndef missingMappingsCmd
2
$(error $$(missingMappingsCmd) required)
3
endif
4
ifndef termsSubdirs
5
$(error $$(termsSubdirs) required)
6
endif
7

    
8
missingMappingTypes = join non-empty_join input
9

    
10
missing_mappings: _always $(missingMappingTypes:%=missing_%_mappings)\
11
unmapped_terms.csv new_terms.csv ;
12

    
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

    
20
catTerms = $(if $(+w),cat $(+w)|env -i sort -u >$@; $(bin)/autoremove $@)
21

    
22
unmapped_terms.csv: $(termsSubdirs:%=%/unmapped_terms.csv)
23
	$(catTerms)
24

    
25
new_terms.csv: $(termsSubdirs:%=%/new_terms.csv)
26
	$(catTerms)
(20-20/40)