yatex

view makefile @ 479:87504e29b1d5

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