yatex

annotate makefile @ 382:e009c4f86ede

Change default directory of HELP file to under `site-lisp/yatex'.
author HIROSE Yuuji <yuuji@gentei.org>
date Tue, 06 Jan 2015 20:29:08 +0900
parents 9cef5d10a0f1
children 04ee01ddb7ab
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@67 49 # make ci to check in all
yuuji@81 50 # make co to check out all
yuuji@330 51 MVER = 1.78
yuuji@330 52 LISP = ${LISP18} ${LISP19} ${LISP23}
yuuji@67 53 YAHTML = yahtml.el
yuuji@67 54 COMMON = yatexlib.el yatexprc.el
yuuji@67 55 LISP18 = comment.el yatex.el yatexadd.el yatexgen.el yatexenv.el \
yuuji@67 56 ${COMMON} \
yuuji@67 57 yatexmth.el yatexhks.el yatexhlp.el \
yuuji@81 58 yatexm-o.el yatexsec.el yatexhie.el yatexpkg.el ${YAHTML}
yuuji@67 59 LISP19 = yatex19.el
yuuji@330 60 LISP23 = yatex23.el
yuuji@67 61 DOCS = ${DOCSRC} ${DOCOBJ} ${NEWS}
yuuji@67 62 NEWS = yatex.new
yuuji@81 63 DOCHTML = docs/htmlqa docs/htmlqa.eng docs/yahtmlj.tex docs/yahtmle.tex
yuuji@67 64 DOCSRC = docs/yatexj.tex docs/yatexe.tex \
yuuji@67 65 docs/yatex.ref docs/yatexref.eng \
yuuji@67 66 docs/yatexadd.doc docs/yatexgen.doc \
yuuji@67 67 docs/qanda docs/qanda.eng ${DOCHTML}
yuuji@81 68 DOCOBJ = docs/yatexj docs/yatexe docs/yahtmlj docs/yahtmle
yuuji@67 69 HELP = help/YATEXHLP.jp help/YATEXHLP.eng
yuuji@24 70 MANIFEST= manifest
yuuji@201 71 EXTRA = dir install 00readme makefile readme.meadow.j newpage.rb
yuuji@67 72 DISTRIB = ${EXTRA} ${LISP} ${DOCS} ${MANIFEST} ${HELP}
yuuji@67 73 RCSFILE = ${LISP} ${NEWS} ${DOCSRC} ${HELP}
yuuji@67 74 YAHTMLLISP = ${YAHTML} ${COMMON}
yuuji@201 75 YAHTMLDIST = ${YAHTMLLISP} install 00readme makefile newpage.rb
yuuji@81 76 PACK = `ls ${DISTRIB}`
yuuji@24 77 TMPDIR = /tmp
yuuji@286 78 VERSION = `head -20 yatex.el|awk -F'"' '/revision/{print $$2}'`
yuuji@67 79 PACKDIR = ${TMPDIR}/yatex${VERSION}
yuuji@24 80
yuuji@24 81 all:
yuuji@67 82 @echo "Edit this makefile first."
yuuji@67 83 @echo 'Type "make install" to install YaTeX.'
yuuji@67 84 @echo 'Type "make install-yahtml" to install yahtml.'
yuuji@81 85 @echo 'If you cling to elc files. type "make elc" before make install'
yuuji@81 86 # @echo "If you don't use X-clinet of Emacs,"
yuuji@81 87 # @echo 'type "make install-nw" instead.'
yuuji@24 88
yuuji@382 89 install: install-real install-message
yuuji@81 90 #install-yahtml: bytecompile-yahtml
yuuji@81 91 install-yahtml:
yuuji@81 92 [ -d ${LISPDIR} ] || mkdir ${LISPDIR}
yuuji@81 93 for f in *.el; do \
yuuji@81 94 rm -f ${LISPDIR}/$${f}c; \
yuuji@81 95 done
yuuji@81 96
yuuji@81 97 ${INSTALL} *.el* ${LISPDIR}
yuuji@24 98
yuuji@67 99 install-real:
yuuji@382 100 [ -d ${LISPDIR} ] || ${MKDIR} ${LISPDIR}
yuuji@382 101 [ -d ${HELPDIR} ] || ${MKDIR} ${HELPDIR}
yuuji@382 102 [ -d ${DOCDIR} ] || ${MKDIR} ${DOCDIR}
yuuji@382 103 [ -d ${INFODIR} ] || ${MKDIR} ${INFODIR}
yuuji@81 104 for f in *.el; do \
yuuji@81 105 rm -f ${LISPDIR}/$${f}c; \
yuuji@81 106 done
yuuji@81 107 ${INSTALL} *.el* ${NEWS} ${LISPDIR}
yuuji@67 108 ${INSTALL} ${DOCSRC} ${DOCDIR}
yuuji@67 109 ${INSTALL} ${DOCOBJ} ${INFODIR}
yuuji@67 110 ${INSTALL} ${HELP} ${HELPDIR}
yuuji@382 111
yuuji@382 112 install-message:
yuuji@81 113 @echo "--------------------------------"
yuuji@81 114 @echo "If you have install-info command, type 'make install-info'."
yuuji@81 115 @echo "If not, add next lines into your site's info dir manually."
yuuji@67 116 @cat dir
yuuji@382 117 @echo "--------------------------------"
yuuji@382 118 @echo "=== INSTALLATION DONE ==="
yuuji@382 119 @echo " You might need to add these expression below to your ~/.emacs"
yuuji@382 120 @echo " 完了. ~/.emacs 等に以下を追加する必要があるかもしれません."
yuuji@382 121 @echo
yuuji@382 122 @echo ";;; ------ Startup definitions for YaTeX ------ ;;;"
yuuji@382 123 @make show-init
yuuji@382 124 @echo ";;; ------------------------------------------- ;;;"
yuuji@382 125 @echo
yuuji@382 126 @echo " To get elisp above again, call make command as below."
yuuji@382 127 @echo " 上記elispを再度得るには以下のようにmakeを起動してください."
yuuji@382 128 @echo " % make $${PREFIX:+PREFIX=$$PREFIX }show-init"
yuuji@67 129
yuuji@81 130 install-info:
yuuji@81 131 for f in ${DOCOBJ}; do \
yuuji@81 132 b=`basename $$f | sed 's,/.*,,'`; \
yuuji@81 133 ${INSTINFO} --entry="`grep $$b dir`" --section=TeX \
yuuji@81 134 --section=Emacs $${f} ${INFODIR}/dir; \
yuuji@81 135 done
yuuji@81 136
yuuji@382 137 show-init:
yuuji@382 138 @printf '%s\n%s\n%s\n%s\n' \
yuuji@382 139 '(setq auto-mode-alist' \
yuuji@382 140 " (cons (cons \"\\.tex$$\" 'yatex-mode) auto-mode-alist))" \
yuuji@382 141 "(autoload 'yatex-mode \"yatex\" \"Yet Another LaTeX mode\" t)" \
yuuji@382 142 "(add-to-list 'load-path \"${LISPDIR}\")"
yuuji@382 143 @printf '(setq tex-command "%s")%s\n' \
yuuji@382 144 `CMDS='platex pdflatex ptex2pdf lualatex' DFLT=latex \
yuuji@382 145 make search-cmd`
yuuji@382 146 @printf '(setq dvi2-command "%s")%s\n' \
yuuji@382 147 `CMDS='pxdvi xdvik kxdvi dviout texworks' DFLT=xdvi \
yuuji@382 148 make search-cmd`
yuuji@382 149 @printf '(setq tex-pdfview-command "%s")%s\n' \
yuuji@382 150 `CMDS='evince mupdf xpdf kpdf texworks sumatrapdf' \
yuuji@382 151 DFLT=acroread \
yuuji@382 152 make search-cmd`
yuuji@382 153
yuuji@382 154 show-init2:
yuuji@382 155 @make LISPDIR=$$PWD show-init
yuuji@382 156
yuuji@382 157 search-cmd:
yuuji@382 158 @for f in $$CMDS; do \
yuuji@382 159 type $$f >/dev/null 2>&1 && echo $$f && exit 0; done; echo $$DFLT
yuuji@382 160
yuuji@67 161 install-nw: bytecompile-nw install-real
yuuji@67 162
yuuji@81 163 elc: bytecompile
yuuji@81 164
yuuji@67 165 bytecompile: lp
yuuji@67 166 if [ "$$DISPLAY"x = ""x ]; then \
yuuji@67 167 echo "Set DISPLAY environment variable!!"; exit 1; fi
yuuji@81 168 ${EMACS} -q ${GEO} -l ./yatexlib.el -e bcf-and-exit ${LISP}
yuuji@67 169
yuuji@81 170 bytecompile-nw: lp1
yuuji@81 171 ${EMACS} -batch -l ./yatexlib.el -e batch-byte-compile ${LISP18}
yuuji@67 172
yuuji@81 173 bytecompile-yahtml:
yuuji@67 174 if [ "$$DISPLAY"x = ""x ]; then \
yuuji@67 175 echo "Set DISPLAY environment variable!!"; exit 1; fi
yuuji@81 176 ${EMACS} -q -g 80x20+0+0 -l ./yatexlib.el -e bcf-and-exit ${YAHTMLLISP}
yuuji@67 177
yuuji@67 178 lp:
yuuji@67 179 echo '(setq load-path (cons "." load-path))' > lp.el
yuuji@67 180 echo '(load-file "./yatexlib.el")' >>lp.el
yuuji@67 181
yuuji@81 182 lp1: lp
yuuji@67 183 echo '(load-file "./yatex.el")' >>lp.el
yuuji@67 184 echo '(load-file "./comment.el")' >>lp.el
yuuji@67 185
yuuji@67 186 lp2:
yuuji@67 187 echo '(setq load-path (cons "'`pwd`'" load-path))' >>lp.el
yuuji@67 188 echo '(setq auto-mode-alist' >>lp.el
yuuji@67 189 echo '(cons (cons "\\.tex" '"'yatex-mode) auto-mode-alist))" >>lp.el
yuuji@67 190 echo '(load-library "yatex")' >>lp.el
yuuji@67 191
yuuji@67 192 ajimi: lp lp2
yuuji@67 193 ${EMACS} -l ./lp.el -e yatex-mode
yuuji@67 194
yuuji@67 195 ajimi-nw: lp lp2
yuuji@67 196 ${EMACS} -nw -l ./lp.el -e yatex-mode
yuuji@67 197
yuuji@67 198 clean:
yuuji@67 199 rm -f *.elc *~ lp.el
yuuji@67 200
yuuji@81 201 info: docs/yatexj docs/yatexe docs/yahtmlj docs/yahtmle
yuuji@67 202
yuuji@67 203 docs/yatexj: docs/yatexj.tex
yuuji@81 204 (cd docs; ${EMACS} -batch -l ../yatexlib.el -e tfb-and-exit yatexj.tex)
yuuji@67 205
yuuji@67 206 docs/yatexe: docs/yatexe.tex
yuuji@81 207 (cd docs; ${EMACS} -batch -l ../yatexlib.el -e tfb-and-exit yatexe.tex)
yuuji@81 208
yuuji@81 209 docs/yahtmlj: docs/yahtmlj.tex
yuuji@81 210 (cd docs;${EMACS} -batch -l ../yatexlib.el -e tfb-and-exit yahtmlj.tex)
yuuji@81 211
yuuji@81 212 docs/yahtmle: docs/yahtmle.tex
yuuji@81 213 (cd docs;${EMACS} -batch -l ../yatexlib.el -e tfb-and-exit yahtmle.tex)
yuuji@67 214
yuuji@67 215 package: info
yuuji@67 216 @-mkdir ${PACKDIR}
yuuji@67 217 @tar cf - ${PACK} | (cd ${PACKDIR}; tar xf -)
yuuji@67 218 ( version=${VERSION}; cd ${TMPDIR}; \
yuuji@67 219 ${TAR} vzcf ${TMPDIR}/yatex$$version.tar.gz yatex$$version)
yuuji@67 220
yuuji@67 221 yahtmlpack:
yuuji@67 222 @-mkdir ${PACKDIR}
yuuji@67 223 @tar cf - ${YAHTMLDIST} | (cd ${PACKDIR}; tar xf -)
yuuji@67 224 ( version=${VERSION}; cd ${TMPDIR}; \
yuuji@67 225 ${TAR} vzcf ${TMPDIR}/yahtml$$version.tar.gz yatex$$version)
yuuji@24 226
yuuji@24 227 ci:
yuuji@67 228 ci -r${VERSION} -sRel -f ${RCSFILE}
yuuji@67 229 ci -u${VERSION} makefile 00readme
yuuji@40 230
yuuji@24 231 co:
yuuji@67 232 co ${RCSFILE}
yuuji@40 233
yuuji@24 234 co-l:
yuuji@67 235 co -l ${RCSFILE}
yuuji@27 236
yuuji@27 237 tci:
yuuji@67 238 ci -l${VERSION}.0 -Ncurrent ${RCSFILE} makefile
yuuji@27 239
yuuji@27 240 dostci:
yuuji@67 241 ci -l${MVER}.0 -Ncurrent @rcsfile
yuuji@27 242
yuuji@35 243 gohome:
yuuji@35 244 zip -u -r /com/okoma/yuuji/tmp/dosconv/yatex.zip . \
yuuji@35 245 -x '*RCS/*' -x 'texinfo/*'
yuuji@81 246
yuuji@81 247 RSYNCDIR = ${HOME}/http/yatex/rsync/yatex
yuuji@114 248 #sync:
yuuji@114 249 # @-mkdir ${PACKDIR}
yuuji@114 250 # @tar cf - ${PACK} | (cd ${PACKDIR}; tar xf -)
yuuji@114 251 # syncdir -A -x CVS ${PACKDIR} ${RSYNCDIR}
yuuji@114 252 # (cd ${RSYNCDIR}; cvs ci -m '')
yuuji@114 253 # rm -rf ${PACKDIR}