-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
150 lines (128 loc) · 4.19 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
.PHONY: all
all: dictionaries cli
.PHONY: dictionaries
dictionaries: unidic ipadic jumandic
.PHONY: mecab
mecab:
@download_mecab.sh
.PHONY: unidic
unidic: mecab
@download_unidic.sh
@cd unidic && make dictionaries
.PHONY: unidic-cwj
unidic-cwj: mecab
@download_unidic.sh cwj
@cd unidic && make cwj
.PHONY: unidic-cwj-neologd
unidic-cwj-neologd: mecab
@download_unidic.sh cwj
@cd unidic && make cwj-neologd
.PHONY: unidic-csj
unidic-csj: mecab
@download_unidic.sh csj
@cd unidic && make csj
.PHONY: unidic-csj-neologd
unidic-csj-neologd: mecab
@download_unidic.sh csj
@cd unidic && make csj-neologd
.PHONY: ipadic
ipadic: mecab
@download_ipadic.sh
@cd ipadic && make dictionaries
.PHONY: ipadic-only
ipadic-only: mecab
@download_ipadic.sh
@cd ipadic && make ipadic
.PHONY: ipadic-neologd
ipadic-neologd: mecab
@download_ipadic.sh
@cd ipadic && make ipadic-neologd
.PHONY: jumandic
jumandic: mecab
@download_jumandic.sh
@cd jumandic && make dictionary
.PHONY: cli
cli:
@cd mecab-cli && poetry build
.PHONY: build-package
build-package:
@cd unidic/unidic-cwj/ && poetry build
@cd unidic/unidic-cwj-neologd/ && poetry build
@cd unidic/unidic-csj/ && poetry build
@cd unidic/unidic-csj-neologd/ && poetry build
@cd ipadic/ipadic/ && poetry build
@cd ipadic/ipadic-neologd/ && poetry build
@cd jumandic/jumandic/ && poetry build
.PHONY: reflect-dicrc
reflect-dicrc:
@cp -f unidic/dicrc unidic/unidic-cwj/unidic_cwj/dic/.
@cp -f unidic/dicrc unidic/unidic-cwj-neologd/unidic_cwj_neologd/dic/.
@cp -f unidic/dicrc unidic/unidic-csj/unidic_csj/dic/.
@cp -f unidic/dicrc unidic/unidic-csj-neologd/unidic_csj_neologd/dic/.
@cp -f ipadic/dicrc ipadic/ipadic/ipadic/dic/.
@cp -f ipadic/dicrc ipadic/ipadic-neologd/ipadic_neologd/dic/.
@cp -f jumandic/dicrc jumandic/jumandic/jumandic/dic/.
.PHONY: install-dictionaries-local
install-dictionaries-local:
pip install unidic/unidic-cwj/dist/unidic_cwj-*.whl
pip install unidic/unidic-cwj-neologd/dist/unidic_cwj_neologd-*.whl
pip install unidic/unidic-csj/dist/unidic_csj-*.whl
pip install unidic/unidic-csj-neologd/dist/unidic_csj_neologd-*.whl
pip install ipadic/ipadic/dist/ipadic-*.whl
pip install ipadic/ipadic-neologd/dist/ipadic_neologd-*.whl
pip install jumandic/jumandic/dist/jumandic-*.whl
.PHONY: uninstall-dictionaries-local
uninstall-dictionaries-local:
pip uninstall -y unidic-cwj unidic-cwj-neologd unidic-csj unidic-csj-neologd ipadic ipadic-neologd jumandic
.PHONY: install-pipx
install-pipx:
pipx install mecab-cli/dist/mecab_cli-*.whl
pipx inject mecab-cli unidic/unidic-cwj/dist/unidic_cwj-*.whl
pipx inject mecab-cli unidic/unidic-cwj-neologd/dist/unidic_cwj_neologd-*.whl
pipx inject mecab-cli unidic/unidic-csj/dist/unidic_csj-*.whl
pipx inject mecab-cli unidic/unidic-csj-neologd/dist/unidic_csj_neologd-*.whl
pipx inject mecab-cli ipadic/ipadic/dist/ipadic-*.whl
pipx inject mecab-cli ipadic/ipadic-neologd/dist/ipadic_neologd-*.whl
pipx inject mecab-cli jumandic/jumandic/dist/jumandic-*.whl
.PHONY: uninstall-pipx
uninstall-pipx:
pipx uninstall mecab-cli
.PHONY: clean
clean: clean-python clean-dictionary clean-system
.PHONY: clean-python
clean-python:
@find . -name '*.pyc' -exec rm -f {} +
@find . -name '*.pyo' -exec rm -f {} +
@find . -name '*.pyd' -exec rm -f {} +
@find . -name '__pycache__' -exec rm -rf {} +
.PHONY: clean-dictonary
clean-dictionary:
@cd unidic && make clean
@cd ipadic && make clean
@cd jumandic && make clean
@rm -f unidic/user.csv
@rm -f unidic/version-unidic-cwj
@rm -f unidic/version-unidic-csj
@rm -f unidic/version-unidic-neologd
@rm -rf unidic/src-unidic-cwj/
@rm -rf unidic/src-unidic-cwj-neologd/
@rm -rf unidic/src-unidic-csj/
@rm -rf unidic/src-unidic-csj-neologd/
@rm -rf unidic-cwj-*-full/
@rm -rf unidic-csj-*-full/
@rm -f ipadic/user.csv
@rm -f ipadic/version-ipadic
@rm -f ipadic/version-ipadic-neologd
@rm -rf ipadic/src-ipadic/
@rm -rf ipadic/src-ipadic-neologd/
@rm -rf ipadic-2.7.0-20070801/
@rm -f jumandic/user.csv
@rm -f jumandic/version-jumandic
@rm -rf jumandic/src-jumandic/
@rm -rf jumandic-7.0-20130310/
@rm -rf mecab-0.996/
@rm -rf mecab-cli/dist/
.PHONY: clean-system
clean-system:
@find . -name '*~' -exec rm -f {} +
@find . -name '.DS_Store' -exec rm -f {} +