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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
--- Makefile.orig Wed Jul 18 08:20:40 2001
+++ Makefile Fri Aug 3 22:18:35 2001
@@ -19,14 +19,14 @@
## EDIT THE FOLLOWINGS
##
-prefix=/usr/local
+prefix=${PREFIX}
infodir=$(prefix)/info
##
## Compile engines
##
-EMACS = emacs
+EMACS = ${EMACS_CMD}
#EMACS = xemacs
#EMACS = mule
@@ -34,7 +34,7 @@
## A directory where mew*.el[c] will be installed.
##
-elispdir = $(prefix)/share/emacs/site-lisp/mew
+elispdir = $(prefix)/${EMACS_LIBDIR}/site-lisp/mew${MEW_MAJOR_VER}
#elispdir = $(prefix)/lib/$(EMACS)/site-lisp
#elispdir = $(prefix)/lib/emacs
@@ -42,7 +42,10 @@
## A directory where etc file will be installed.
##
-etcdir = $(prefix)/lib/$(EMACS)/etc/Mew
+etcdir = $(prefix)/${EMACS_LIBDIR}/etc/mew${MEW_MAJOR_VER}
+
+# For XEmacs packages
+XPKGDIR= $(prefix)/${EMACS_PACKAGESDIR}
################################################################
##
@@ -67,6 +70,8 @@
mew-key.elc mew-thread.elc mew-smime.elc \
mew-theme.elc mew.elc
+OBJS_PKG= auto-autoloads.elc custom-load.elc
+
SRCS = mew-addrbook.el mew-attach.el mew-blvs.el \
mew-bq.el mew-cache.el mew-complete.el \
mew-config.el mew-const.el mew-decode.el \
@@ -87,6 +92,8 @@
mew-thread.el mew-smime.el mew-theme.el \
mew.el
+SRCS_PKG= auto-autoloads.el custom-load.el
+
TEMPFILE = temp.el
CP = cp
@@ -103,7 +110,9 @@
################################################################
-el: $(TEMPFILE) mew.el
+el: $(OBJS)
+
+$(OBJS): $(TEMPFILE) mew.el
@echo 'Compiling EL files of Mew ... '
@echo 'PLEASE IGNORE WARNINGS IF DISPLAYED. TAKE IT EASY!'
$(EMACS) -batch -q -no-site-file -l ./$(TEMPFILE) -f mew-compile
@@ -116,11 +125,11 @@
@echo ')))' >> $(TEMPFILE)
install-el: $(OBJS)
- -@if [ ! -d $(elispdir) ]; then \
+ if [ ! -d $(elispdir) ]; then \
$(MKDIR) $(elispdir); \
fi
- $(CP) $(SRCS) $(elispdir)
- $(CP) $(OBJS) $(elispdir)
+ ${BSD_INSTALL_DATA} $(SRCS) $(elispdir)
+ ${BSD_INSTALL_DATA} $(OBJS) $(elispdir)
################################################################
@@ -136,7 +145,9 @@
cd info; $(MAKE) info EMACS=$(EMACS)
install-info:
- cd info; $(MAKE) install-info infodir=$(infodir)
+ ${MKDIR} $(infodir)
+ cd info; $(MAKE) install-info infodir=$(infodir) \
+ XEMACS_VER_OVER20="${XEMACS_VER_OVER20}"
################################################################
@@ -144,15 +155,72 @@
cd info; $(MAKE) jinfo EMACS=$(EMACS)
install-jinfo:
- cd info; $(MAKE) install-jinfo infodir=$(infodir)
+ ${MKDIR} $(infodir)
+ cd info; $(MAKE) install-jinfo infodir=$(infodir) \
+ XEMACS_VER_OVER20="${XEMACS_VER_OVER20}"
+
+install-man:
+ ${MKDIR} ${MANDIR}
+ cd info; $(MAKE) install-man MANDIR=$(MANDIR)
################################################################
install-etc:
- -@if [ ! -d $(etcdir) ]; then \
+ if [ ! -d $(etcdir) ]; then \
$(MKDIR) $(etcdir); \
fi
- cd etc; $(CP) -r * $(etcdir)/
+ cd etc; $(CP) -R * $(etcdir)/
+
+################################################################
+
+package: ${OBJS} ${OBJS_PKG} bin
+
+${OBJS_PKG}: ${SRCS_PKG}
+ ${EMACS} -vanilla -batch -eval "(push \"./\" load-path)" -l bytecomp \
+ -f batch-byte-compile ${.ALLSRC}
+
+auto-autoloads.el : ${OBJS} _pkg.el
+ ${EMACS} -vanilla -batch \
+ -eval "(setq autoload-package-name \"${XEMACS_PKGNAME}\")" \
+ -l autoload -f batch-update-directory .
+ ${RM} -f auto-autoloads.el~
+
+custom-load.el : ${OBJS}
+ ${EMACS} -vanilla -batch -l cus-dep -f Custom-make-dependencies .
+ if [ ! -f ${.TARGET} ]; then \
+ touch ${.TARGET}; \
+ fi
+
+_pkg.el:
+ @echo Creating _pkg.el
+ @echo ";;;###autoload" > _pkg.el
+ @echo "(package-provide '${XEMACS_PKGNAME}" >> _pkg.el
+ @echo " :version $(XEMACS_PKGVER)" >> _pkg.el
+ @echo " :type 'regular)" >> _pkg.el
+
+install-mule-package: install-package
+ ${MAKE} infodir=${XPKGDIR}/info XEMACS_VER_OVER20="yes" install-jinfo
+ ${MAKE} manifest
+
+install-package:
+ ${MKDIR} ${XPKGDIR}/pkginfo
+ ${MAKE} install-bin
+ ${MAKE} elispdir=${XPKGDIR}/lisp/mew${MEW_MAJOR_VER} install-el
+ ${BSD_INSTALL_DATA} _pkg.el ${OBJS_PKG} ${SRCS_PKG} \
+ ${XPKGDIR}/lisp/mew${MEW_MAJOR_VER}
+ ${MAKE} infodir=${XPKGDIR}/info XEMACS_VER_OVER20="yes" \
+ install-info
+ ${MAKE} MANDIR=${XPKGDIR}/man/mew${MEW_MAJOR_VER} install-man
+ ${MAKE} etcdir=${XPKGDIR}/etc/mew${MEW_MAJOR_VER} install-etc
+ ${MAKE} manifest
+
+manifest:
+ (cd ${XPKGDIR}; \
+ ls -d1 lisp/mew${MEW_MAJOR_VER}/* info/mew${MEW_MAJOR_VER}.* \
+ man/mew${MEW_MAJOR_VER}/* etc/mew${MEW_MAJOR_VER}/* \
+ > ${XPKGDIR}/pkginfo/MANIFEST.mew${MEW_MAJOR_VER})
+ ${ECHO} "pkginfo/MANIFEST.mew${MEW_MAJOR_VER}" \
+ >> ${XPKGDIR}/pkginfo/MANIFEST.mew${MEW_MAJOR_VER}
################################################################
|