Makefile
changeset 387 1616fc7c1f09
parent 384 3af39c0b5229
child 388 d98d8f8cdef9
equal deleted inserted replaced
386:00243929823a 387:1616fc7c1f09
   129 # Project dirs/files.
   129 # Project dirs/files.
   130 
   130 
   131 pkgname = gadict
   131 pkgname = gadict
   132 fullpkgname = $(pkgname)-$(vmajor).$(vminor)
   132 fullpkgname = $(pkgname)-$(vmajor).$(vminor)
   133 
   133 
   134 GADICT_FILES := $(wildcard *.gadict)
   134 # GADICT_FILES := $(wildcard *.gadict)
   135 
   135 GADICT_FILES := gadict_en-ru+ua.gadict
   136 C5_FILES := $(wildcard *.dict-c5)
   136 
   137 DICT_FILES := $(C5_FILES:.dict-c5=.dict)
   137 C5_FILES := $(patsubst %.gadict,dist/dictd/%.c5,$(GADICT_FILES))
   138 DICTDZ_FILES := $(C5_FILES:.dict-c5=.dict.dz)
   138 DICT_FILES := $(C5_FILES:.c5=.dict)
   139 INDEX_FILES := $(C5_FILES:.dict-c5=.index)
   139 DICTDZ_FILES := $(C5_FILES:.c5=.dict.dz)
       
   140 INDEX_FILES := $(C5_FILES:.c5=.index)
   140 
   141 
   141 RST_TMPL_FILE = dist/misc/rst.tmpl
   142 RST_TMPL_FILE = dist/misc/rst.tmpl
   142 RST_CSS_FILE = www/tmpl/rst.css
   143 RST_CSS_FILE = www/tmpl/rst.css
   143 
   144 
   144 RST_GEN_FILES := STAT.rst
   145 RST_GEN_FILES := STAT.rst
   310 
   311 
   311 .PHONY: dict
   312 .PHONY: dict
   312 dict: $(DICTDZ_FILES) $(INDEX_FILES)
   313 dict: $(DICTDZ_FILES) $(INDEX_FILES)
   313 
   314 
   314 #  --case-sensitive
   315 #  --case-sensitive
   315 %.dict %.index: %.dict-c5
   316 #	-u "`sed -n '\|http://[[:print:]]\+/|{s=^.*\(http://\)=\1=;p;q;}' $<`"
   316 	sed '/^#/d' $< | dictfmt  -c5 \
   317 #	-s "`sed -n '/^ABOUT: /{s=ABOUT: ==;p;q;}' $<`"
   317 	--headword-separator '; ' --break-headwords \
   318 dist/dictd/%.dict dist/dictd/%.index: dist/dictd/%.c5
   318 	--utf8 --allchars \
   319 	(cd dist/dictd; dictfmt  -c5 --headword-separator '; ' --break-headwords --utf8 --allchars $*)  < $<
   319 	-u "`sed -n '\|http://[[:print:]]\+/|{s=^.*\(http://\)=\1=;p;q;}' $<`" \
   320 
   320 	-s "`sed -n '/^ABOUT: /{s=ABOUT: ==;p;q;}' $<`" \
   321 dist/dictd/%.dict.dz: dist/dictd/%.dict
   321 	$*
       
   322 
       
   323 %.dict.dz: %.dict
       
   324 	dictzip -c $< >$@
   322 	dictzip -c $< >$@
       
   323 
       
   324 dist/dictd/%.c5: %.gadict | dist/dictd
       
   325 	python3 gadict.py $< $@
       
   326 
       
   327 dist/dictd:
       
   328 	mkdir -p $@
   325 
   329 
   326 ################################################################
   330 ################################################################
   327 # Install/uninstall targets.
   331 # Install/uninstall targets.
   328 
   332 
   329 .PHONY: install
   333 .PHONY: install