Makefile
changeset 50 37931fbb857f
parent 46 86c0184efac7
child 54 12426df26196
equal deleted inserted replaced
49:006364e21073 50:37931fbb857f
    18   endif
    18   endif
    19 endif
    19 endif
    20 datarootdir = $(prefix)/share
    20 datarootdir = $(prefix)/share
    21 datadir = $(datarootdir)/dictd
    21 datadir = $(datarootdir)/dictd
    22 
    22 
    23 C5_FILES := $(wildcard *.c5)
    23 C5_FILES := $(wildcard *.dict-c5)
    24 DICT_FILES := $(C5_FILES:.c5=.dict)
    24 DICT_FILES := $(C5_FILES:.dict-c5=.dict)
    25 DICTDZ_FILES := $(C5_FILES:.c5=.dict.dz)
    25 DICTDZ_FILES := $(C5_FILES:.dict-c5=.dict.dz)
    26 INDEX_FILES := $(C5_FILES:.c5=.index)
    26 INDEX_FILES := $(C5_FILES:.dict-c5=.index)
    27 
    27 
    28 
    28 
    29 .PHONY: all
    29 .PHONY: all
    30 all: dist
    30 all: dist
    31 
    31 
    32 .PHONY: dist
    32 .PHONY: dist
    33 dist: $(DICTDZ_FILES) $(INDEX_FILES)
    33 dist: $(DICTDZ_FILES) $(INDEX_FILES)
    34 
    34 
    35 #  --case-sensitive
    35 #  --case-sensitive
    36 %.dict %.index: %.c5
    36 %.dict %.index: %.dict-c5
    37 	sed '/^#/d' $< | dictfmt  -c5 \
    37 	sed '/^#/d' $< | dictfmt  -c5 \
    38 	--headword-separator '; ' --break-headwords \
    38 	--headword-separator '; ' --break-headwords \
    39 	--utf8 --allchars \
    39 	--utf8 --allchars \
    40 	-u "`sed -n '\|http://[[:print:]]\+/|{s=^.*\(http://\)=\1=;p;q;}' $<`" \
    40 	-u "`sed -n '\|http://[[:print:]]\+/|{s=^.*\(http://\)=\1=;p;q;}' $<`" \
    41 	-s "`sed -n '/^ABOUT: /{s=ABOUT: ==;p;q;}' $<`" \
    41 	-s "`sed -n '/^ABOUT: /{s=ABOUT: ==;p;q;}' $<`" \