rev |
line source |
yuuji@24
|
1 #
|
yuuji@201
|
2 # Makefile for YaTeX/yahtml
|
yuuji@24
|
3 #
|
yuuji@24
|
4
|
yuuji@67
|
5 # Edit these variables to be suitable for your site
|
yuuji@382
|
6 EMACS = emacs
|
yuuji@382
|
7 #EMACS = mule
|
yuuji@382
|
8 PREFIX = `${EMACS} -batch --eval '(princ (expand-file-name "../../../.." data-directory))'`
|
yuuji@382
|
9 # PREFIX = /usr/local
|
yuuji@67
|
10
|
yuuji@101
|
11 #EMACSDIR= ${PREFIX}/lib/${EMACS}
|
yuuji@201
|
12 ## emacs20 or later
|
yuuji@101
|
13 EMACSDIR= ${PREFIX}/share/${EMACS}
|
yuuji@81
|
14 ## XEmacs
|
yuuji@81
|
15 #EMACS = xemacs
|
yuuji@81
|
16 #EMACSDIR= ${PREFIX}/lib/${EMACS}
|
yuuji@81
|
17 ## Meadow (Sample)
|
yuuji@81
|
18 #EMACS = meadow
|
yuuji@81
|
19 #EMACSDIR = c:/usr/local/meadow
|
yuuji@302
|
20 ## Cocoa(or Carbon)Emacs on Darwin (Sample)
|
yuuji@81
|
21 #EMACS = /Applications/Emacs.app/Contents/MacOS/Emacs
|
yuuji@81
|
22 #PREFIX = /Applications/Emacs.app/Contents/Resources
|
yuuji@81
|
23 #EMACSDIR = ${PREFIX}
|
yuuji@81
|
24
|
yuuji@67
|
25 LISPDIR = ${EMACSDIR}/site-lisp/yatex
|
yuuji@81
|
26 # LISPDIR = ${EMACSDIR}/site-packages/lisp/yatex
|
yuuji@67
|
27 DOCDIR = ${LISPDIR}/docs
|
yuuji@382
|
28 HELPDIR = ${LISPDIR}/help
|
yuuji@382
|
29 INFODIR = ${PREFIX}/share/info
|
yuuji@67
|
30
|
yuuji@81
|
31 TAR = tar
|
yuuji@67
|
32 INSTALL = install -c -m 444
|
yuuji@81
|
33 MKDIR = mkdir -p
|
yuuji@81
|
34 INSTINFO= install-info
|
yuuji@81
|
35
|
yuuji@81
|
36
|
yuuji@81
|
37 # Comment out below if you are using Emacs Windows(meadow, etc)
|
yuuji@81
|
38 GEO = -geometry 80x20+0+0
|
yuuji@67
|
39
|
yuuji@67
|
40 ###################
|
yuuji@67
|
41 # Do not edit below
|
yuuji@67
|
42 ###################
|
yuuji@67
|
43 # make install to install YaTeX into public space
|
yuuji@67
|
44 # make ajimi to feel taste
|
yuuji@67
|
45 # make ajimi-nw same as above, but -nw mode
|
yuuji@67
|
46 # make package to create package for relase
|
yuuji@67
|
47 # make yahtmlpack to create package for relase
|
yuuji@67
|
48 # make clean to delete all producted files
|
yuuji@489
|
49 # make tag to add release tags
|
yuuji@330
|
50 LISP = ${LISP18} ${LISP19} ${LISP23}
|
yuuji@67
|
51 YAHTML = yahtml.el
|
yuuji@522
|
52 COMMON = yatexlib.el yatexprc.el yatexhlp.el
|
yuuji@489
|
53 LISP18 = yatex.el yatexadd.el yatexgen.el yatexenv.el \
|
yuuji@67
|
54 ${COMMON} \
|
yuuji@533
|
55 yatexmth.el yatexhks.el yatexhlp.el yatexflt.el \
|
yuuji@81
|
56 yatexm-o.el yatexsec.el yatexhie.el yatexpkg.el ${YAHTML}
|
yuuji@67
|
57 LISP19 = yatex19.el
|
yuuji@330
|
58 LISP23 = yatex23.el
|
yuuji@67
|
59 DOCS = ${DOCSRC} ${DOCOBJ} ${NEWS}
|
yuuji@67
|
60 NEWS = yatex.new
|
yuuji@81
|
61 DOCHTML = docs/htmlqa docs/htmlqa.eng docs/yahtmlj.tex docs/yahtmle.tex
|
yuuji@67
|
62 DOCSRC = docs/yatexj.tex docs/yatexe.tex \
|
yuuji@67
|
63 docs/yatex.ref docs/yatexref.eng \
|
yuuji@67
|
64 docs/yatexadd.doc docs/yatexgen.doc \
|
yuuji@67
|
65 docs/qanda docs/qanda.eng ${DOCHTML}
|
yuuji@81
|
66 DOCOBJ = docs/yatexj docs/yatexe docs/yahtmlj docs/yahtmle
|
yuuji@67
|
67 HELP = help/YATEXHLP.jp help/YATEXHLP.eng
|
yuuji@24
|
68 MANIFEST= manifest
|
yuuji@201
|
69 EXTRA = dir install 00readme makefile readme.meadow.j newpage.rb
|
yuuji@67
|
70 DISTRIB = ${EXTRA} ${LISP} ${DOCS} ${MANIFEST} ${HELP}
|
yuuji@67
|
71 RCSFILE = ${LISP} ${NEWS} ${DOCSRC} ${HELP}
|
yuuji@67
|
72 YAHTMLLISP = ${YAHTML} ${COMMON}
|
yuuji@201
|
73 YAHTMLDIST = ${YAHTMLLISP} install 00readme makefile newpage.rb
|
yuuji@81
|
74 PACK = `ls ${DISTRIB}`
|
yuuji@24
|
75 TMPDIR = /tmp
|
yuuji@286
|
76 VERSION = `head -20 yatex.el|awk -F'"' '/revision/{print $$2}'`
|
yuuji@67
|
77 PACKDIR = ${TMPDIR}/yatex${VERSION}
|
yuuji@24
|
78
|
yuuji@24
|
79 all:
|
yuuji@67
|
80 @echo "Edit this makefile first."
|
yuuji@389
|
81 @echo 'Type "${MAKE} install" to install YaTeX.'
|
yuuji@389
|
82 @echo 'Type "${MAKE} install-yahtml" to install yahtml.'
|
yuuji@389
|
83 @echo 'If you love elc files, type "${MAKE} elc" before ${MAKE} install'
|
yuuji@81
|
84 # @echo "If you don't use X-clinet of Emacs,"
|
yuuji@81
|
85 # @echo 'type "make install-nw" instead.'
|
yuuji@24
|
86
|
yuuji@382
|
87 install: install-real install-message
|
yuuji@81
|
88 #install-yahtml: bytecompile-yahtml
|
yuuji@81
|
89 install-yahtml:
|
yuuji@81
|
90 [ -d ${LISPDIR} ] || mkdir ${LISPDIR}
|
yuuji@81
|
91 for f in *.el; do \
|
yuuji@81
|
92 rm -f ${LISPDIR}/$${f}c; \
|
yuuji@81
|
93 done
|
yuuji@81
|
94
|
yuuji@81
|
95 ${INSTALL} *.el* ${LISPDIR}
|
yuuji@24
|
96
|
yuuji@67
|
97 install-real:
|
yuuji@382
|
98 [ -d ${LISPDIR} ] || ${MKDIR} ${LISPDIR}
|
yuuji@382
|
99 [ -d ${HELPDIR} ] || ${MKDIR} ${HELPDIR}
|
yuuji@382
|
100 [ -d ${DOCDIR} ] || ${MKDIR} ${DOCDIR}
|
yuuji@382
|
101 [ -d ${INFODIR} ] || ${MKDIR} ${INFODIR}
|
yuuji@81
|
102 for f in *.el; do \
|
yuuji@81
|
103 rm -f ${LISPDIR}/$${f}c; \
|
yuuji@81
|
104 done
|
yuuji@81
|
105 ${INSTALL} *.el* ${NEWS} ${LISPDIR}
|
yuuji@67
|
106 ${INSTALL} ${DOCSRC} ${DOCDIR}
|
yuuji@67
|
107 ${INSTALL} ${DOCOBJ} ${INFODIR}
|
yuuji@67
|
108 ${INSTALL} ${HELP} ${HELPDIR}
|
yuuji@382
|
109
|
yuuji@382
|
110 install-message:
|
yuuji@81
|
111 @echo "--------------------------------"
|
yuuji@389
|
112 @echo "If you have install-info command, type '${MAKE} install-info'."
|
yuuji@81
|
113 @echo "If not, add next lines into your site's info dir manually."
|
yuuji@67
|
114 @cat dir
|
yuuji@382
|
115 @echo "--------------------------------"
|
yuuji@382
|
116 @echo "=== INSTALLATION DONE ==="
|
yuuji@382
|
117 @echo " You might need to add these expression below to your ~/.emacs"
|
yuuji@489
|
118 @echo " 完了. ~/.emacs 等に以下を追加する必要があるかもしれません."
|
yuuji@382
|
119 @echo
|
yuuji@382
|
120 @echo ";;; ------ Startup definitions for YaTeX ------ ;;;"
|
yuuji@389
|
121 @${MAKE} show-init
|
yuuji@382
|
122 @echo ";;; ------------------------------------------- ;;;"
|
yuuji@382
|
123 @echo
|
yuuji@389
|
124 @echo " To get elisp above again, call ${MAKE} command as below."
|
yuuji@489
|
125 @echo " 上記elispを再度得るには以下のように${MAKE}を起動してください."
|
yuuji@389
|
126 @echo " % ${MAKE} $${PREFIX:+PREFIX=$$PREFIX }show-init"
|
yuuji@67
|
127
|
yuuji@81
|
128 install-info:
|
yuuji@81
|
129 for f in ${DOCOBJ}; do \
|
yuuji@81
|
130 b=`basename $$f | sed 's,/.*,,'`; \
|
yuuji@81
|
131 ${INSTINFO} --entry="`grep $$b dir`" --section=TeX \
|
yuuji@81
|
132 --section=Emacs $${f} ${INFODIR}/dir; \
|
yuuji@81
|
133 done
|
yuuji@81
|
134
|
yuuji@382
|
135 show-init:
|
yuuji@387
|
136 @printf '%s\n' \
|
yuuji@382
|
137 '(setq auto-mode-alist' \
|
yuuji@382
|
138 " (cons (cons \"\\.tex$$\" 'yatex-mode) auto-mode-alist))" \
|
yuuji@382
|
139 "(autoload 'yatex-mode \"yatex\" \"Yet Another LaTeX mode\" t)" \
|
yuuji@387
|
140 "(add-to-list 'load-path \"${LISPDIR}\")" \
|
yuuji@387
|
141 "(setq YaTeX-help-file \"${LISPDIR}/help/YATEXHLP.eng\")"
|
yuuji@389
|
142 @printf '(setq tex-command "%s")\n' \
|
yuuji@382
|
143 `CMDS='platex pdflatex ptex2pdf lualatex' DFLT=latex \
|
yuuji@389
|
144 ${MAKE} -s search-cmd`
|
yuuji@389
|
145 @printf '(setq dvi2-command "%s")\n' \
|
yuuji@382
|
146 `CMDS='pxdvi xdvik kxdvi dviout texworks' DFLT=xdvi \
|
yuuji@389
|
147 ${MAKE} -s search-cmd`
|
yuuji@389
|
148 @printf '(setq tex-pdfview-command "%s")\n' \
|
yuuji@382
|
149 `CMDS='evince mupdf xpdf kpdf texworks sumatrapdf' \
|
yuuji@382
|
150 DFLT=acroread \
|
yuuji@389
|
151 ${MAKE} -s search-cmd`
|
yuuji@382
|
152
|
yuuji@382
|
153 show-init2:
|
yuuji@389
|
154 @${MAKE} LISPDIR=$$PWD show-init
|
yuuji@382
|
155
|
yuuji@382
|
156 search-cmd:
|
yuuji@382
|
157 @for f in $$CMDS; do \
|
yuuji@382
|
158 type $$f >/dev/null 2>&1 && echo $$f && exit 0; done; echo $$DFLT
|
yuuji@382
|
159
|
yuuji@67
|
160 install-nw: bytecompile-nw install-real
|
yuuji@67
|
161
|
yuuji@81
|
162 elc: bytecompile
|
yuuji@81
|
163
|
yuuji@67
|
164 bytecompile: lp
|
yuuji@67
|
165 if [ "$$DISPLAY"x = ""x ]; then \
|
yuuji@67
|
166 echo "Set DISPLAY environment variable!!"; exit 1; fi
|
yuuji@81
|
167 ${EMACS} -q ${GEO} -l ./yatexlib.el -e bcf-and-exit ${LISP}
|
yuuji@67
|
168
|
yuuji@81
|
169 bytecompile-nw: lp1
|
yuuji@81
|
170 ${EMACS} -batch -l ./yatexlib.el -e batch-byte-compile ${LISP18}
|
yuuji@67
|
171
|
yuuji@81
|
172 bytecompile-yahtml:
|
yuuji@67
|
173 if [ "$$DISPLAY"x = ""x ]; then \
|
yuuji@67
|
174 echo "Set DISPLAY environment variable!!"; exit 1; fi
|
yuuji@81
|
175 ${EMACS} -q -g 80x20+0+0 -l ./yatexlib.el -e bcf-and-exit ${YAHTMLLISP}
|
yuuji@67
|
176
|
yuuji@67
|
177 lp:
|
yuuji@67
|
178 echo '(setq load-path (cons "." load-path))' > lp.el
|
yuuji@67
|
179 echo '(load-file "./yatexlib.el")' >>lp.el
|
yuuji@67
|
180
|
yuuji@81
|
181 lp1: lp
|
yuuji@67
|
182 echo '(load-file "./yatex.el")' >>lp.el
|
yuuji@67
|
183
|
yuuji@67
|
184 lp2:
|
yuuji@67
|
185 echo '(setq load-path (cons "'`pwd`'" load-path))' >>lp.el
|
yuuji@67
|
186 echo '(setq auto-mode-alist' >>lp.el
|
yuuji@67
|
187 echo '(cons (cons "\\.tex" '"'yatex-mode) auto-mode-alist))" >>lp.el
|
yuuji@67
|
188 echo '(load-library "yatex")' >>lp.el
|
yuuji@67
|
189
|
yuuji@67
|
190 ajimi: lp lp2
|
yuuji@67
|
191 ${EMACS} -l ./lp.el -e yatex-mode
|
yuuji@67
|
192
|
yuuji@67
|
193 ajimi-nw: lp lp2
|
yuuji@67
|
194 ${EMACS} -nw -l ./lp.el -e yatex-mode
|
yuuji@67
|
195
|
yuuji@67
|
196 clean:
|
yuuji@67
|
197 rm -f *.elc *~ lp.el
|
yuuji@67
|
198
|
yuuji@81
|
199 info: docs/yatexj docs/yatexe docs/yahtmlj docs/yahtmle
|
yuuji@67
|
200
|
yuuji@67
|
201 docs/yatexj: docs/yatexj.tex
|
yuuji@81
|
202 (cd docs; ${EMACS} -batch -l ../yatexlib.el -e tfb-and-exit yatexj.tex)
|
yuuji@67
|
203
|
yuuji@67
|
204 docs/yatexe: docs/yatexe.tex
|
yuuji@81
|
205 (cd docs; ${EMACS} -batch -l ../yatexlib.el -e tfb-and-exit yatexe.tex)
|
yuuji@81
|
206
|
yuuji@81
|
207 docs/yahtmlj: docs/yahtmlj.tex
|
yuuji@81
|
208 (cd docs;${EMACS} -batch -l ../yatexlib.el -e tfb-and-exit yahtmlj.tex)
|
yuuji@81
|
209
|
yuuji@81
|
210 docs/yahtmle: docs/yahtmle.tex
|
yuuji@81
|
211 (cd docs;${EMACS} -batch -l ../yatexlib.el -e tfb-and-exit yahtmle.tex)
|
yuuji@67
|
212
|
yuuji@67
|
213 package: info
|
yuuji@67
|
214 @-mkdir ${PACKDIR}
|
yuuji@67
|
215 @tar cf - ${PACK} | (cd ${PACKDIR}; tar xf -)
|
yuuji@67
|
216 ( version=${VERSION}; cd ${TMPDIR}; \
|
yuuji@67
|
217 ${TAR} vzcf ${TMPDIR}/yatex$$version.tar.gz yatex$$version)
|
yuuji@67
|
218
|
yuuji@67
|
219 yahtmlpack:
|
yuuji@67
|
220 @-mkdir ${PACKDIR}
|
yuuji@67
|
221 @tar cf - ${YAHTMLDIST} | (cd ${PACKDIR}; tar xf -)
|
yuuji@67
|
222 ( version=${VERSION}; cd ${TMPDIR}; \
|
yuuji@67
|
223 ${TAR} vzcf ${TMPDIR}/yahtml$$version.tar.gz yatex$$version)
|
yuuji@24
|
224
|
yuuji@479
|
225 tag:
|
yuuji@487
|
226 hg tag yatex-${VERSION}
|
yuuji@479
|
227 # ci:
|
yuuji@479
|
228 # ci -r${VERSION} -sRel -f ${RCSFILE}
|
yuuji@479
|
229 # ci -u${VERSION} makefile 00readme
|
yuuji@40
|
230
|
yuuji@479
|
231 # co:
|
yuuji@479
|
232 # co ${RCSFILE}
|
yuuji@40
|
233
|
yuuji@27
|
234
|
yuuji@81
|
235 RSYNCDIR = ${HOME}/http/yatex/rsync/yatex
|
yuuji@535
|
236 sync:
|
yuuji@537
|
237 -hg push
|
yuuji@537
|
238 -hg push git
|
yuuji@536
|
239 -hg push cvs
|
yuuji@540
|
240 (cd ${RSYNCDIR} && hg up -Cv dev && cvs ci -m '')
|