forked from spellcheck-ko/hunspell-dict-ko
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
48 lines (35 loc) · 1.26 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
PYTHON = python3
ZIP = zip -r
AFFIX = ko.aff
DICT = ko.dic
CLEANFILES = $(AFFIX) $(DICT)
SOURCES = make-aff-dic.py config.py suffix.py suffixdata.py jamo.py \
flags.py aff.py josa.py template.aff
DICT_DATA = dict-ko-builtins.xml dict-ko-galkwi.xml
DISTDIR = dist
PACKAGE = hunspell-dict-ko
VERSION = $(shell $(PYTHON) -c 'import config;print(config.version)')
RELEASETAG = HEAD
SRC_DISTNAME = hunspell-dict-ko-$(VERSION)
SRC_DISTFILE = $(DISTDIR)/$(SRC_DISTNAME).tar.xz
BIN_DISTNAME = ko-aff-dic-$(VERSION)
BIN_DISTFILE = $(DISTDIR)/$(BIN_DISTNAME).zip
BIN_DISTCONTENT = LICENSE LICENSE.GPL LICENSE.LGPL LICENSE.MPL $(AFFIX) $(DICT)
all: $(AFFIX) $(DICT)
$(AFFIX) $(DICT): $(DICT_DATA) $(SOURCES)
$(PYTHON) make-aff-dic.py $(AFFIX) $(DICT) $(DICT_DATA)
distdir:
if ! [ -d $(DISTDIR) ]; then mkdir $(DISTDIR); fi
clean:
rm -f $(CLEANFILES)
rm -rf $(DISTDIR)
dist:: distdir $(BIN_DISTCONTENT)
git archive --format=tar.xz --prefix=$(SRC_DISTNAME)/ -o $(SRC_DISTFILE) $(RELEASETAG) || (echo "** Do 'git config tar.tar.xz.command \"xz -c\"'"; false)
rm -f $(BIN_DISTFILE)
mkdir -p $(BIN_DISTNAME)
install -m644 $(BIN_DISTCONTENT) $(BIN_DISTNAME)/
$(ZIP) $(BIN_DISTFILE) $(BIN_DISTNAME)
rm -rf $(BIN_DISTNAME)
test:
$(MAKE) -C tests test
.PHONY: all clean dist distdir test