-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
214 lines (177 loc) · 5.94 KB
/
makefile
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
#
# Makefile for YaTeX/yahtml
#
# Edit these variables to be suitable for your site
PREFIX = /usr/local
## mule2
#EMACS = mule
#EMACSDIR= ${PREFIX}/lib/${EMACS}
## emacs20 or later
EMACS = emacs
EMACSDIR= ${PREFIX}/share/${EMACS}
## XEmacs
#EMACS = xemacs
#EMACSDIR= ${PREFIX}/lib/${EMACS}
## Meadow (Sample)
#EMACS = meadow
#EMACSDIR = c:/usr/local/meadow
## CarbonEmacs on Darwin (Sample)
#EMACS = /Applications/Emacs.app/Contents/MacOS/Emacs
#PREFIX = /Applications/Emacs.app/Contents/Resources
#EMACSDIR = ${PREFIX}
LISPDIR = ${EMACSDIR}/site-lisp/yatex
# LISPDIR = ${EMACSDIR}/site-packages/lisp/yatex
DOCDIR = ${LISPDIR}/docs
HELPDIR = ${EMACSDIR}/site-lisp
INFODIR = ${PREFIX}/info
TAR = tar
INSTALL = install -c -m 444
MKDIR = mkdir -p
INSTINFO= install-info
# Comment out below if you are using Emacs Windows(meadow, etc)
GEO = -geometry 80x20+0+0
###################
# Do not edit below
###################
# make install to install YaTeX into public space
# make install-nw same as above, but -nw mode, or Emacs18(Nemacs)
# make ajimi to feel taste
# make ajimi-nw same as above, but -nw mode
# make package to create package for relase
# make yahtmlpack to create package for relase
# make clean to delete all producted files
# make ci to check in all
# make co to check out all
MVER = 1.77
LISP = ${LISP18} ${LISP19}
YAHTML = yahtml.el
COMMON = yatexlib.el yatexprc.el
LISP18 = comment.el yatex.el yatexadd.el yatexgen.el yatexenv.el \
${COMMON} \
yatexmth.el yatexhks.el yatexhlp.el \
yatexm-o.el yatexsec.el yatexhie.el yatexpkg.el ${YAHTML}
LISP19 = yatex19.el
DOCS = ${DOCSRC} ${DOCOBJ} ${NEWS}
NEWS = yatex.new
DOCHTML = docs/htmlqa docs/htmlqa.eng docs/yahtmlj.tex docs/yahtmle.tex
DOCSRC = docs/yatexj.tex docs/yatexe.tex \
docs/yatex.ref docs/yatexref.eng \
docs/yatexadd.doc docs/yatexgen.doc \
docs/qanda docs/qanda.eng ${DOCHTML}
DOCOBJ = docs/yatexj docs/yatexe docs/yahtmlj docs/yahtmle
HELP = help/YATEXHLP.jp help/YATEXHLP.eng
MANIFEST= manifest
EXTRA = dir install 00readme makefile readme.meadow.j newpage.rb
DISTRIB = ${EXTRA} ${LISP} ${DOCS} ${MANIFEST} ${HELP}
RCSFILE = ${LISP} ${NEWS} ${DOCSRC} ${HELP}
YAHTMLLISP = ${YAHTML} ${COMMON}
YAHTMLDIST = ${YAHTMLLISP} install 00readme makefile newpage.rb
PACK = `ls ${DISTRIB}`
TMPDIR = /tmp
VERSION = `head -20 yatex.el|awk -F'"' '/revision/{print $$2}'`
PACKDIR = ${TMPDIR}/yatex${VERSION}
all:
@echo "Edit this makefile first."
@echo 'Type "make install" to install YaTeX.'
@echo 'Type "make install-yahtml" to install yahtml.'
@echo 'If you cling to elc files. type "make elc" before make install'
# @echo "If you don't use X-clinet of Emacs,"
# @echo 'type "make install-nw" instead.'
install: install-real
#install-yahtml: bytecompile-yahtml
install-yahtml:
[ -d ${LISPDIR} ] || mkdir ${LISPDIR}
for f in *.el; do \
rm -f ${LISPDIR}/$${f}c; \
done
${INSTALL} *.el* ${LISPDIR}
install-real:
if [ ! -d ${LISPDIR} ]; then ${MKDIR} ${LISPDIR}; fi
if [ ! -d ${DOCDIR} ]; then ${MKDIR} ${DOCDIR}; fi
if [ ! -d ${INFODIR} ]; then ${MKDIR} ${INFODIR}; fi
for f in *.el; do \
rm -f ${LISPDIR}/$${f}c; \
done
${INSTALL} *.el* ${NEWS} ${LISPDIR}
${INSTALL} ${DOCSRC} ${DOCDIR}
${INSTALL} ${DOCOBJ} ${INFODIR}
${INSTALL} ${HELP} ${HELPDIR}
@echo "--------------------------------"
@echo "If you have install-info command, type 'make install-info'."
@echo "If not, add next lines into your site's info dir manually."
@cat dir
install-info:
for f in ${DOCOBJ}; do \
b=`basename $$f | sed 's,/.*,,'`; \
${INSTINFO} --entry="`grep $$b dir`" --section=TeX \
--section=Emacs $${f} ${INFODIR}/dir; \
done
install-nw: bytecompile-nw install-real
elc: bytecompile
bytecompile: lp
if [ "$$DISPLAY"x = ""x ]; then \
echo "Set DISPLAY environment variable!!"; exit 1; fi
${EMACS} -q ${GEO} -l ./yatexlib.el -e bcf-and-exit ${LISP}
bytecompile-nw: lp1
${EMACS} -batch -l ./yatexlib.el -e batch-byte-compile ${LISP18}
bytecompile-yahtml:
if [ "$$DISPLAY"x = ""x ]; then \
echo "Set DISPLAY environment variable!!"; exit 1; fi
${EMACS} -q -g 80x20+0+0 -l ./yatexlib.el -e bcf-and-exit ${YAHTMLLISP}
lp:
echo '(setq load-path (cons "." load-path))' > lp.el
echo '(load-file "./yatexlib.el")' >>lp.el
lp1: lp
echo '(load-file "./yatex.el")' >>lp.el
echo '(load-file "./comment.el")' >>lp.el
lp2:
echo '(setq load-path (cons "'`pwd`'" load-path))' >>lp.el
echo '(setq auto-mode-alist' >>lp.el
echo '(cons (cons "\\.tex" '"'yatex-mode) auto-mode-alist))" >>lp.el
echo '(load-library "yatex")' >>lp.el
ajimi: lp lp2
${EMACS} -l ./lp.el -e yatex-mode
ajimi-nw: lp lp2
${EMACS} -nw -l ./lp.el -e yatex-mode
clean:
rm -f *.elc *~ lp.el
info: docs/yatexj docs/yatexe docs/yahtmlj docs/yahtmle
docs/yatexj: docs/yatexj.tex
(cd docs; ${EMACS} -batch -l ../yatexlib.el -e tfb-and-exit yatexj.tex)
docs/yatexe: docs/yatexe.tex
(cd docs; ${EMACS} -batch -l ../yatexlib.el -e tfb-and-exit yatexe.tex)
docs/yahtmlj: docs/yahtmlj.tex
(cd docs;${EMACS} -batch -l ../yatexlib.el -e tfb-and-exit yahtmlj.tex)
docs/yahtmle: docs/yahtmle.tex
(cd docs;${EMACS} -batch -l ../yatexlib.el -e tfb-and-exit yahtmle.tex)
package: info
@-mkdir ${PACKDIR}
@tar cf - ${PACK} | (cd ${PACKDIR}; tar xf -)
( version=${VERSION}; cd ${TMPDIR}; \
${TAR} vzcf ${TMPDIR}/yatex$$version.tar.gz yatex$$version)
yahtmlpack:
@-mkdir ${PACKDIR}
@tar cf - ${YAHTMLDIST} | (cd ${PACKDIR}; tar xf -)
( version=${VERSION}; cd ${TMPDIR}; \
${TAR} vzcf ${TMPDIR}/yahtml$$version.tar.gz yatex$$version)
ci:
ci -r${VERSION} -sRel -f ${RCSFILE}
ci -u${VERSION} makefile 00readme
co:
co ${RCSFILE}
co-l:
co -l ${RCSFILE}
tci:
ci -l${VERSION}.0 -Ncurrent ${RCSFILE} makefile
dostci:
ci -l${MVER}.0 -Ncurrent @rcsfile
gohome:
zip -u -r /com/okoma/yuuji/tmp/dosconv/yatex.zip . \
-x '*RCS/*' -x 'texinfo/*'
RSYNCDIR = ${HOME}/http/yatex/rsync/yatex
#sync:
# @-mkdir ${PACKDIR}
# @tar cf - ${PACK} | (cd ${PACKDIR}; tar xf -)
# syncdir -A -x CVS ${PACKDIR} ${RSYNCDIR}
# (cd ${RSYNCDIR}; cvs ci -m '')
# rm -rf ${PACKDIR}