Sync up with egg-980712.
[elisp/egg.git] / Makefile
1 # Makefile --- Makefile of EGG V4.0
2
3 # Copyright (C) 1997, 1998 Mule Project,
4 # Powered by ElectrotechnicalLaboratory, JAPAN.
5 # Project Leader: Satoru Tomura <tomura@etl.go.jp>
6
7 DOTEMACS=/home/niibe/.emacs
8 LEIMDIR=/usr/local/share/emacs/20.2.96/leim
9 SITEDIR=/usr/local/share/emacs/site-lisp
10
11 INSTALL=/usr/bin/install
12 ######
13
14 DEPS = -l ./docomp.el
15 BATCHFLAGS = -batch -q -no-site-file
16 EMACS = /usr/local/bin/emacs
17
18 .SUFFIXES: .el .elc
19
20 ETCS = Makefile leim-list-egg.el AUTHORS ChangeLog README TODO docomp.el \
21        Egg.prj PROBLEMS
22
23 SRCS = menudiag.el its.el egg-edep.el \
24        its/ascii.el \
25        its/erpin.el \
26        its/hankata.el \
27        its/hira.el \
28        its/jeonkak.el \
29        its/pinyin.el \
30        its/hangul.el \
31        its/kata.el \
32        its/thai.el \
33        its/quanjiao.el \
34        its/zenkaku.el \
35        its/zhuyin.el \
36        its-keydef.el \
37        egg-mlh.el egg-cnv.el egg-com.el \
38        egg.el \
39        egg/cannarpc.el egg/canna.el \
40        egg/sj3rpc.el egg/sj3.el \
41        egg/wnnrpc.el egg/wnn.el 
42
43 ELCS = ${SRCS:.el=.elc}
44
45 DIST = ${ETCS} ${SRCS}
46
47 .el.elc:
48         ${EMACS} ${BATCHFLAGS} ${DEPS} -f batch-byte-compile $<
49
50 all: ${ELCS}
51
52 clean: 
53         rm -f ${ELCS} leim-list.el
54
55 dotemacs:
56         @if (grep "^;;; Emacs/Egg Configuration" $(DOTEMACS) 2>&1) >/dev/null; then \
57                 echo Emacs/Egg setup already exists in $(DOTEMACS);     \
58         else                                                            \
59                 (echo >> $(DOTEMACS)); \
60                 (echo ";;; Emacs/Egg Configuration" >> $(DOTEMACS)); \
61                 (echo "(require 'egg)" >> $(DOTEMACS)); \
62                 echo "Added Emacs/Egg setup to $(DOTEMACS)"; \
63         fi
64
65 leim-list.el:
66         @if (grep ";;; Egg" ${LEIMDIR}/leim-list.el 2>&1) >/dev/null; then \
67           echo Egg setup already exists in ${LEIMDIR}/leim-list.el; \
68           cat ${LEIMDIR}/leim-list.el  >leim-list.el; \
69         else                                                            \
70           cat ${LEIMDIR}/leim-list.el leim-list-egg.el >leim-list.el; \
71         fi
72
73 install-leim: leim-list.el
74         ${INSTALL} leim-list.el ${SITEDIR}
75
76 install-dirs:
77         for d in its egg; do \
78           if [ ! -d ${SITEDIR}/$$d ]; then mkdir -p ${SITEDIR}/$$d; fi; \
79         done
80
81 install: all install-dirs
82         for x in ${SRCS} ${ELCS}; do ${INSTALL} -m 644 $$x ${SITEDIR}/`dirname $$x`; done
83         @echo -n "### See leim-list-egg.el for registering input method"
84         @echo " (if you haven't yet)."
85
86 # DEPENDENCIES
87 egg/sj3rpc.elc: egg-com.elc egg/sj3.elc
88 egg/wnnrpc.elc: egg-com.elc egg/wnn.elc
89
90 egg.elc its/ascii.elc its/erpin.elc its/hankata.elc \
91        its/hira.elc its/jeonkak.elc its/pinyin.elc \
92        its/hangul.elc its/kata.elc its/quanjiao.elc \
93        its/zenkaku.elc its/zhuyin.elc: its-keydef.elc
94
95 distclean:
96         rm -f ${ELCS} leim-list.el *~
97
98 ###  Source code maintainance
99 DATE=$(shell date "+%y%m%d")
100
101 dist: distclean
102         rm -rf ../egg-${DATE}
103         mkdir ../egg-${DATE}
104         tar -c -f - ${DIST} | tar Cxf ../egg-${DATE} -
105         (cd ../egg-${DATE}; \
106          sed "/^### Source code maintainance/,\$$d" <Makefile >Makefile.dist; \
107          mv -f Makefile.dist Makefile)
108         (cd ..; tar cvzf egg-${DATE}.tar.gz egg-${DATE})
109
110 working-ss: distclean
111         rm -rf ../egg-snap-${DATE}
112         mkdir ../egg-snap-${DATE}
113         tar -c -f - . | tar Cxf ../egg-snap-${DATE} -
114         (cd ..; tar cvzf egg-snap-${DATE}.tar.gz egg-snap-${DATE})