include ../lib/common.Makefile ##### Vars/functions # Make SHELL := /bin/bash # Paths bin := ../bin inputCoreMaps := VegCore-VegBIEN.csv VegX-VegCore.csv vocab := VegCore.csv dict := Veg+-VegCore.csv ##### General targets all: _always VegCore.csv Veg+-VegCore.csv VegCore.tables.redmine\ $(inputCoreMaps) ; clean: _always $(RM) $(all) all := ##### Core maps VegCore.htm: php -r 'fpassthru(fopen("https://projects.nceas.ucsb.edu/nceas/projects/bien/wiki/VegCore", "r"));' >$@ VegCore.csv: VegCore.htm (echo VegCore; $(sed) -n 's/^.*]*>]*>(([a-z]|[A-Z]{2})[^<]*)<\/a>$@ Veg+-VegCore.csv: VegCore.htm (echo "Veg+,VegCore"; $(bin)/redmine_synonyms|grep -vE '^\??[A-Z][a-z]')\ <$< >$@ # Canonicalize alternatives of ambiguous terms using unambiguous mappings $(bin)/in_place $@ $(bin)/translate 1 <(grep -vE '^\?' $(dict)) $(bin)/in_place $@ $(bin)/collapse_multimap # Replace ambiguous terms with alternatives lists $(bin)/in_place $@ $(bin)/translate 1 $(dict) VegCore.tables.csv: VegCore.htm <$< $(sed) -n 's/^.*