summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.name>2024-08-06 22:24:38 +0100
committerNick White <git@njw.name>2024-08-06 22:24:38 +0100
commit241b0b693511283811a1f73bda47cf844a403c7b (patch)
tree592b85b8d65d172fae7f4f4ec12547483da3d004
parentd5d2797fbd85f6216122e3ea2f46ba111b401f1e (diff)
downloadoed2dict-241b0b693511283811a1f73bda47cf844a403c7b.tar.bz2
oed2dict-241b0b693511283811a1f73bda47cf844a403c7b.zip
Update makefile to add slob option
-rw-r--r--Makefile19
1 files changed, 15 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 8b6d8fd..3814c93 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,18 @@
PREFIX = /usr
+# Dependencies:
+# - dictd format: dictfmt, dictzip
+# - slob format: pyglossary, slob
+
+NAME = 'Oxford English Dictionary, 2nd Edition'
+
.SUFFIXES: .htm .jargon .sed .dict .dz
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)
-all: oed.jargon oed.dict.dz
+all: oed.jargon oed.dict.dz oed.slob
$(JARGONS): htmtojargon.awk removeetags.pl symbols.sed \
xmlcleanup.sed xmlcleanup2.sed
@@ -30,15 +36,20 @@ oed.jargon: $(JARGONS)
oed.dict: oed.jargon
cat oed.jargon \
| dictfmt -j --utf8 \
- --columns 0 --headword-separator ',' \
+ --columns 0 --allchars \
+ --headword-separator ',' \
--index-data-separator " " \
- -u http://njw.me.uk/oed \
- -s "Oxford English Dictionary, 2nd Edition" \
+ -u http://njw.name/oed2dict \
+ -s "$(NAME)" \
oed
oed.dict.dz: oed.dict
dictzip -k oed.dict
+oed.slob: oed.dict.dz
+ pyglossary oed.index $@
+ slob tag -n label -v "$(NAME)" oed.slob
+
install: all
chmod 644 oed.dict.dz oed.index
cp oed.dict.dz oed.index $(DESTDIR)$(PREFIX)/share/dictd/