Project

General

Profile

« Previous | Next » 

Revision 4857

input.Makefile: Maps validation: %/new_terms.csv: Include the entire map spreadsheet row, so that each new term is listed together with its mapping. This facilitates adding new mappings to mappings/Veg+-VegCore.csv directly from any new_terms.csv. Note that the use of `sort -u` (in lib/mappings.Makefile) causes multiline comments to be separated, leading to spurious lines for each multiline comment line.

View differences:

input.Makefile
278 278

  
279 279
# `tail -n +2`: Remove header before running filter_out_ci because filter_out_ci
280 280
# only removes the header if it matches the vocabulary's header.
281
define newTerms
281
define unmappedTerms
282 282
tail -n +2 $<|$(bin)/cols $(1)$(2) >$@
283 283
$(bin)/autoremove $@
284 284
endef
285 285

  
286 286
%/unmapped_terms.csv: %/map.csv $(coreMap)
287
	$(call newTerms,1,|$(bin)/filter_out_ci 0 $(coreMap))
287
	$(call unmappedTerms,1,|$(bin)/filter_out_ci 0 $(coreMap))
288 288

  
289 289
%/new_terms.csv: %/map.csv $(vocab) $(dict) %/unmapped_terms.csv
290
	$(call newTerms,0,$(rmNewTerms))
291
rmNewTerms = |$(bin)/filter_out_ci 0 $(vocab)|$(bin)/filter_out_ci 0 $(dict)\
292
$(if $(wildcard $(word 4,$+)),|$(bin)/filter_out_ci 0 $(word 4,$+))
290
	$(newTerms)
291
	$(bin)/autoremove $@
292
newTerms = tail -n +2 $<|$(bin)/filter_out_ci 0 $(vocab)|$(bin)/filter_out_ci 0\
293
$(dict) $(if $(wildcard $(word 4,$+)),|$(bin)/filter_out_ci 0 $(word 4,$+)) >$@
293 294

  
294 295
termsSubdirs := $(tables)
295 296

  

Also available in: Unified diff