Project

General

Profile

« Previous | Next » 

Revision 4615

input.Makefile: Maps validation: %/new_terms.csv: Remove terms which are also in %/unmapped_terms.csv, because terms are not considered new (i.e. potential Veg+ terms) until they have been mapped to an existing Veg+ term. Being unmapped has a higher priority than being new, because it affects the current datasource itself rather than the easier mapping of future datasources.

View differences:

input.Makefile
319 319
##### Maps validation
320 320

  
321 321
define newTerms
322
$(bin)/filter_out_ci <$< $(1) $(word 2,$+)|$(bin)/cols $(1)|tail +2 >$@
322
$(bin)/filter_out_ci <$< $(1) $(word 2,$+)|$(bin)/cols $(1)$(2)|tail +2 >$@
323 323
$(bin)/autoremove $@
324 324
endef
325 325

  
326 326
%/unmapped_terms.csv: %/map.csv $(vocab)
327 327
	$(call newTerms,1)
328 328

  
329
%/new_terms.csv: %/map.csv $(vocab)
330
	$(call newTerms,0)
329
%/new_terms.csv: %/map.csv $(vocab) %/unmapped_terms.csv
330
	$(call newTerms,0,$(rmNewTerms))
331
rmNewTerms = $(if $(wildcard $(word 3,$+)),|$(bin)/filter_out_ci 0 $(word 3,$+))
331 332

  
332 333
termsSubdirs := $(tables)
333 334

  

Also available in: Unified diff