1# FreeWnn is a network-extensible Kana-to-Kanji conversion system.
2# This file is part of FreeWnn.
3#
4# Copyright Kyoto University Research Institute for Mathematical Sciences
5#                 1987, 1988, 1989, 1990, 1991, 1992
6# Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999
7# Copyright ASTEC, Inc. 1987, 1988, 1989, 1990, 1991, 1992
8# Copyright FreeWnn Project 2001, 2004
9#
10# Author: OMRON SOFTWARE Co., Ltd. <freewnn@rd.kyoto.omronsoft.co.jp>
11# Maintainer:  FreeWnn Project   <freewnn@tomo.gr.jp>
12#
13# This program is free software; you can redistribute it and/or modify
14# it under the terms of the GNU General Public License as published by
15# the Free Software Foundation; either version 2, or (at your option)
16# any later version.
17#
18# This program is distributed in the hope that it will be useful,
19# but WITHOUT ANY WARRANTY; without even the implied warranty of
20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21# GNU General Public License for more details.
22#
23# You should have received a copy of the GNU General Public License
24# along with GNU Emacs; see the file COPYING.  If not, write to the
25# Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26
27include @top_builddir@/makerule.mk
28  top_srcdir = @top_srcdir@
29      srcdir = @srcdir@
30top_builddir = @top_builddir@
31KWNNJUTILOBJ = $(top_builddir)/kWnn/jutil
32
33INSTALL      = @INSTALL@
34
35        ATOD = $(KWNNJUTILOBJ)/katod
36        ATOF = $(KWNNJUTILOBJ)/katof
37    WNNTOUCH = $(KWNNJUTILOBJ)/kwnntouch
38       HINSI = @KHINSI_DATA@
39    FZK_FLAG =
40
41FULL = full.fzk
42
43HINSI_SRC = hinsi.data
44
45FZK_SRCS = fzk.attr fzk.fzkattr fzk.jircon fzk.shuutan 	   fzk.con fzk.jirattr fzk.master
46
47DIC_SRCS = single.u 	hword.u
48
49DICS = single.dic 	hword.dic
50
51ALLTGT = $(FULL) $(DICS)
52
53all:: $(ALLTGT)
54
55.SUFFIXES: .dic .u
56
57.u.dic:
58	$(ATOD) -h $(HINSI) $@ < $<
59
60$(DICS): $(HINSI)
61
62$(FULL):: $(FZK_SRCS) fzk.master-.c
63	$(CPP) -I$(srcdir) $(FZK_FLAG) fzk.master-.c | egrep -v '^(# |#line |#pragma |$$)' | $(ATOF) -h $(HINSI) $@
64
65# To avoid circular dependency, we don't use 'fzk.master.c'
66fzk.master-.c: fzk.master
67	$(RM) $@
68	$(LN) $? $@
69
70clean::
71	$(RM) fzk.master-.c
72
73instserver:: install
74
75install::
76	@case '${MFLAGS}' in *[i]*) set +e;; esac;
77	@for i in $(KWNNDICDIR); do if [ -d $(DESTDIR)$$i ]; then \
78	set +x; else (set -x; $(MKDIRHIER) $(DESTDIR)$$i); fi \
79	done
80
81install:: $(ALLTGT)
82	@if [ -d $(DESTDIR)$(KWNNSYSDICDIR) ]; then set +x; \
83	else (set -x; $(MKDIRHIER) $(DESTDIR)$(KWNNSYSDICDIR)); fi
84	@case '${MFLAGS}' in *[i]*) set +e;; esac;
85	@for i in $(ALLTGT); do if [ -f $(DESTDIR)$(KWNNSYSDICDIR)/$$i ]; then \
86	set +x; \
87	else (set -x; \
88	$(INSTALL) -c $(INSTLIBFLAGS) $$i $(DESTDIR)$(KWNNSYSDICDIR)); fi \
89	done
90
91depend::
92	@echo "skipping make in my dir"
93
94clean::
95	$(RM) $(FULL) $(DICS)
96