blob: c1e527e46c6e2b52956ee4694de8c09a865f4723 (
plain)
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
|
SQL = sqlite3
DICT_DB = dict.db
USER_DB = user.db
DICT_TEMPLATE = dict/template.sql.m4
.PHONY: clean test
all: $(DICT_DB) $(USER_DB)
$(DICT_DB): dict/full.sql
$(SQL) $@ < $<
$(USER_DB): user/full.sql
$(SQL) $@ < $<
dict/base.sql: dict/reset.sql dict/init.sql dict/deinflections.sql dict/tags.sql
cat $^ > $@
dict/full.sql: dict/base.sql dict/dict.sql
cat $^ > $@
dict/dict.sql: dict/test_a.sql dict/test_b.sql dict/test_pitch_accent.sql dict/jmdict.sql
cat $^ > $@
user/base.sql: user/reset.sql user/init.sql
cat $^ > $@
user/full.sql: user/base.sql user/root.sql
cat $^ > $@
%.sql: %.dict.sql $(DICT_TEMPLATE)
m4 $(DICT_TEMPLATE) < $< > $@
# delete generated sql files and database
clean:
$(RM) $(DICT_DB) $(USER_DB) dict/base.sql dict/full.sql dict/dict.sql dict/test_a.sql dict/test_b.sql dict/test_pitch_accent.sql user/base.sql user/full.sql
test: $(DICT_DB) find.sql
./test/find '浮上しました'
./test/find 'ならない'
./test/find '浮上した'
./test/find 'なって'
./test/find 'の下にて'
|