1 # Makefile --- Makefile of EGG V4.0
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>
8 #---------------------------------------
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
22 EGGRC = ${HOME}/${START}
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
30 INSTALL = /usr/sbin/install
34 MKDIR = /usr/bin/mkdir
35 #------------------------------------------------
39 BATCHFLAGS = -batch -q -no-site-file
43 ETCS = Makefile docomp.el eggrc leim-list-egg.el egg-dotemacs \
44 AUTHORS ChangeLog README TODO PROBLEMS
46 SRCS = menudiag.el its.el egg-edep.el \
61 egg-mlh.el egg-cnv.el egg-com.el \
63 egg/cannarpc.el egg/canna.el \
64 egg/sj3rpc.el egg/sj3.el \
65 egg/wnnrpc.el egg/wnn.el
67 ELCS = ${SRCS:.el=.elc}
69 DIST = ${ETCS} ${SRCS}
72 ${EMACS} ${BATCHFLAGS} ${DEPS} -f batch-byte-compile $<
74 all: ${ELCS} leim-list.el
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; \
82 cat ${LEIMDIR}/leim-list.el leim-list-egg.el >leim-list.el; \
86 ${RM} -f ${ELCS} leim-list.el
88 install: install-system
91 if [ ! -d ${INSDIR} ]; then mkdir -p ${INSDIR}; fi
92 tar cf - ${SRCS} ${ELCS} | (cd ${INSDIR} && tar xvf -)
93 ${CP} leim-list.el ${INSDIR}
96 if [ -d ${INSDIR} ]; then \
97 ${RM} -rf ${INSDIR}; \
101 install-user: dotemacs ${EGGRC}
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); \
108 cat egg-dotemacs >> ${DOTEMACS} ; \
109 echo "(setq egg-startup-file \"${STARTUP}\")" >>${DOTEMACS} ; \
110 echo "Added Emacs/Egg setup to $(DOTEMACS)"; \
117 egg/sj3rpc.elc: egg-com.elc egg/sj3.elc
118 egg/wnnrpc.elc: egg-com.elc egg/wnn.elc
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
126 rm -f ${ELCS} leim-list.el *~
128 ### Source code maintainance
129 DATE=$(shell date "+%y%m%d")
132 rm -rf ../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})
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})