Project

General

Profile

« Previous | Next » 

Revision 7484

mappings/Makefile, input.Makefile: Renamed $(dict) to $(thesaurus) because Veg+-VegCore.csv is actually a thesaurus, not a dictionary

View differences:

Makefile
10 10
bin := ../bin
11 11
inputCoreMaps := VegCore-VegBIEN.csv VegX-VegCore.csv
12 12
vocab := VegCore.csv
13
dict := Veg+-VegCore.csv
13
thesaurus := Veg+-VegCore.csv
14 14

  
15 15
##### General targets
16 16

  
17
all: _always $(vocab) $(dict) VegCore.tables.redmine $(inputCoreMaps) ;
17
all: _always $(vocab) $(thesaurus) VegCore.tables.redmine $(inputCoreMaps) ;
18 18

  
19 19
clean: _always
20 20
	$(RM) $(all)
......
30 30
	(echo VegCore; $(sed) -n 's/^.*<h[24][^>]*><a href="#[^>]*>(([a-z]|[A-Z]{2})[^<]*)<\/a><a href="#[^"-]+".*$$/\1/p'\
31 31
|sort -u) <$< >$@
32 32

  
33
$(dict): VegCore.htm
33
$(thesaurus): VegCore.htm
34 34
	(echo "Veg+,VegCore"; $(bin)/redmine_synonyms|grep -vE '^\??[A-Z][a-z]')\
35 35
<$< >$@
36 36
	# Canonicalize alternatives of ambiguous terms using unambiguous mappings
37
	$(bin)/in_place $@ $(bin)/translate 1 <(grep -vE '^\?' $(dict))
37
	$(bin)/in_place $@ $(bin)/translate 1 <(grep -vE '^\?' $(thesaurus))
38 38
	$(bin)/in_place $@ $(bin)/collapse_multimap
39 39
	# Replace ambiguous terms with alternatives lists
40
	$(bin)/in_place $@ $(bin)/translate 1 $(dict)
40
	$(bin)/in_place $@ $(bin)/translate 1 $(thesaurus)
41 41
	$(bin)/in_place $@ $(bin)/sort 0 1
42 42

  
43 43
VegCore.tables.csv: VegCore.htm
......
55 55

  
56 56
ifneq ($(filter .%.last_cleanup,$(MAKECMDGOALS)),)
57 57

  
58
.VegX-VegCore.csv.last_cleanup: .%.last_cleanup: % $(dict)
59
	$(bin)/in_place $< $(bin)/translate_ci 1 $(dict)
58
.VegX-VegCore.csv.last_cleanup: .%.last_cleanup: % $(thesaurus)
59
	$(bin)/in_place $< $(bin)/translate_ci 1 $(thesaurus)
60 60
	$(bin)/in_place $< $(bin)/sort 0 1
61 61
	touch $@
62 62
.PRECIOUS: .VegX-VegCore.csv.last_cleanup
63 63

  
64
.VegCore-VegBIEN.csv.last_cleanup: .%.last_cleanup: % $(dict) $(vocab)
65
	$(bin)/in_place $< $(bin)/translate_ci 0 $(dict)
64
.VegCore-VegBIEN.csv.last_cleanup: .%.last_cleanup: % $(thesaurus) $(vocab)
65
	$(bin)/in_place $< $(bin)/translate_ci 0 $(thesaurus)
66 66
	$(bin)/in_place $< $(bin)/canon 0 $(vocab)
67 67
	$(bin)/in_place $< $(bin)/sort_map
68 68
	touch $@

Also available in: Unified diff