9e1a711d693a5a6eec98712898b2ffcef6b7ac0e
[elisp/tamago.git] / Makefile
1 # Makefile --- Makefile of EGG V4.0
2
3 # Copyright (C) 1999, 2000 Free Software Foundation, Inc
4 # Author: NIIBE Yutaka <gniibe@chroot.org>
5 #         TOMURA Satoru <tomura@etl.go.jp>
6 # Maintaner: Satoru Tomura <tomura@etl.go.jp>
7
8 #---------------------------------------
9 # (1) make
10 #       ;; compile *.el files and make leim-list.el
11 # (2) make install-system
12 #       ;; install files into ${INSDIR} and ${LEIMDIR}
13 # (3) make install-user
14 #       ;; install your initialization files at your home directory
15 #------------------------------------------------
16 #  Configuration parameters
17 #------------------------------------------------
18 # Emacs initialization file at your home directory
19         DOTEMACS= ${HOME}/.emacs
20 # egg initialization file at your home directory
21         STARTUP = .eggrc
22         EGGRC   = ${HOME}/${START}
23 # emacs you use
24         EMACS   = /usr/local/bin/emacs
25 # Egg does not depend on the emacs version (We hope...)
26         INSDIR  = /usr/local/share/emacs/site-lisp/egg
27 # The directory where there is leim-list.el in it.
28         LEIMDIR = /usr/local/share/emacs/20.4/leim
29 # Programs
30         INSTALL = /usr/sbin/install
31         CP      = /bin/cp
32         MV      = /bin/mv
33         RM      = /bin/rm
34         MKDIR   = /usr/bin/mkdir
35 #------------------------------------------------
36
37
38 DEPS = -l ./docomp.el
39 BATCHFLAGS = -batch -q -no-site-file
40
41 .SUFFIXES: .el .elc
42
43 ETCS =  Makefile docomp.el eggrc leim-list-egg.el egg-dotemacs \
44         AUTHORS ChangeLog README TODO PROBLEMS
45
46 SRCS = menudiag.el its.el egg-edep.el \
47        its/ascii.el \
48        its/bixing.el \
49        its/erpin.el \
50        its/hankata.el \
51        its/hira.el \
52        its/jeonkak.el \
53        its/pinyin.el \
54        its/hangul.el \
55        its/kata.el \
56        its/thai.el \
57        its/quanjiao.el \
58        its/zenkaku.el \
59        its/zhuyin.el \
60        its-keydef.el \
61        egg-mlh.el egg-cnv.el egg-com.el \
62        egg.el \
63        egg/cannarpc.el egg/canna.el \
64        egg/sj3rpc.el egg/sj3.el \
65        egg/wnnrpc.el egg/wnn.el 
66
67 ELCS = ${SRCS:.el=.elc}
68
69 DIST = ${ETCS} ${SRCS}
70
71 .el.elc:
72         ${EMACS} ${BATCHFLAGS} ${DEPS} -f batch-byte-compile $<
73
74 all: ${ELCS} leim-list.el
75
76 leim-list.el: leim-list-egg.el
77         @if (grep ";;; leim-list-egg.el" \
78                   ${LEIMDIR}/leim-list.el 2>&1) >/dev/null; then \
79           echo Egg setup already exists in ${LEIMDIR}/leim-list.el; \
80           cat ${LEIMDIR}/leim-list.el  >leim-list.el; \
81         else \
82           cat ${LEIMDIR}/leim-list.el leim-list-egg.el >leim-list.el; \
83         fi
84
85 clean: 
86         ${RM} -f ${ELCS} leim-list.el
87
88 install: install-system
89
90 install-system: all
91         if [ ! -d ${INSDIR} ]; then mkdir -p ${INSDIR}; fi
92         tar cf - ${SRCS} ${ELCS} | (cd ${INSDIR} && tar xvf -)
93         ${CP} leim-list.el ${INSDIR}
94
95 uninstall-system:
96         if [ -d ${INSDIR} ]; then \
97           ${RM} -rf ${INSDIR}; \
98         fi
99
100
101 install-user: dotemacs ${EGGRC}
102
103 dotemacs: egg-dotemacs
104         @if (grep "^;;; Emacs/Egg Configuration" \
105                   $(DOTEMACS) 2>&1) >/dev/null; then \
106           echo Emacs/Egg setup already exists in $(DOTEMACS); \
107         else \
108           cat egg-dotemacs >> ${DOTEMACS} ; \
109           echo "(setq egg-startup-file \"${STARTUP}\")" >>${DOTEMACS} ; \
110           echo "Added Emacs/Egg setup to $(DOTEMACS)"; \
111         fi
112
113 ${EGGRC}: eggrc
114         $(CP) eggrc ${EGGRC}
115
116 # DEPENDENCIES
117 egg/sj3rpc.elc: egg-com.elc egg/sj3.elc
118 egg/wnnrpc.elc: egg-com.elc egg/wnn.elc
119
120 egg.elc its/ascii.elc its/erpin.elc its/hankata.elc \
121        its/hira.elc its/jeonkak.elc its/pinyin.elc \
122        its/hangul.elc its/kata.elc its/quanjiao.elc \
123        its/zenkaku.elc its/zhuyin.elc: its-keydef.elc
124
125 distclean:
126         rm -f ${ELCS} leim-list.el *~
127
128 ###  Source code maintainance
129 DATE=$(shell date "+%y%m%d")
130
131 dist: distclean
132         rm -rf ../egg-${DATE}
133         mkdir ../egg-${DATE}
134         tar -c -f - ${DIST} | tar Cxf ../egg-${DATE} -
135         (cd ../egg-${DATE}; \
136          sed "/^### Source code maintainance/,\$$d" <Makefile >Makefile.dist; \
137          mv -f Makefile.dist Makefile)
138         (cd ..; tar cvzf egg-${DATE}.tar.gz egg-${DATE})
139
140 working-ss: distclean
141         rm -rf ../egg-snap-${DATE}
142         mkdir ../egg-snap-${DATE}
143         tar -c -f - . | tar Cxf ../egg-snap-${DATE} -
144         (cd ..; tar cvzf egg-snap-${DATE}.tar.gz egg-snap-${DATE})