diff options
author | Nick White <git@njw.me.uk> | 2013-03-31 18:32:08 +0100 |
---|---|---|
committer | Nick White <git@njw.me.uk> | 2013-03-31 18:32:08 +0100 |
commit | 2742524159ad2bc861711df084f6bd77588e9e9b (patch) | |
tree | 00508f5d2b5232a8d10298acb59facf86f6f5ff9 /Makefile | |
download | oed2dict-2742524159ad2bc861711df084f6bd77588e9e9b.tar.bz2 oed2dict-2742524159ad2bc861711df084f6bd77588e9e9b.zip |
Initial commit
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..56e318d --- /dev/null +++ b/Makefile @@ -0,0 +1,40 @@ +# requires dictfmt and dictzip tools (from the package dictfmt) + +PREFIX = /usr + +SRC = 1.htm 2.htm 3.htm 4.htm 5.htm \ + 6.htm 7.htm 8.htm 9.htm 10.htm +JARGONS = $(SRC:.htm=.jargon) + +$(JARGONS): symbols.sed + +all: oed.dict.dz + +.htm.jargon: + awk -f htmtojargon.awk < "$<" \ + | sed -f symbols.sed \ + | sed -f xmlcleanup.sed \ + | sed -f xmlcleanup2.sed \ + > "$@" + +symbols.sed: symbols symbolstosed.awk + awk -f symbolstosed.awk < symbols > $@ + +oed.dict: $(JARGONS) + cat $(JARGONS) \ + | dictfmt -j --utf8 \ + --columns 0 --headword-separator ' ' \ + -u http://njw.me.uk/oed \ + -s "Oxford English Dictionary Second Edition v3" \ + oed + +oed.dict.dz: oed.dict + dictzip -k $< + +install: all + cp oed.dict.dz oed.index $(DESTDIR)$(PREFIX)/share/dictd/ + test -x /usr/sbin/dictdconfig && dictdconfig -w + test -x /etc/init.d/dictd && /etc/init.d/dictd restart + +.SUFFIXES: .htm .jargon .sed .dict .dz +.PHONY: all install |