yuuji@24: # yuuji@201: # Makefile for YaTeX/yahtml yuuji@24: # yuuji@24: yuuji@67: # Edit these variables to be suitable for your site yuuji@382: EMACS = emacs yuuji@382: #EMACS = mule yuuji@382: PREFIX = `${EMACS} -batch --eval '(princ (expand-file-name "../../../.." data-directory))'` yuuji@382: # PREFIX = /usr/local yuuji@67: yuuji@101: #EMACSDIR= ${PREFIX}/lib/${EMACS} yuuji@201: ## emacs20 or later yuuji@101: EMACSDIR= ${PREFIX}/share/${EMACS} yuuji@81: ## XEmacs yuuji@81: #EMACS = xemacs yuuji@81: #EMACSDIR= ${PREFIX}/lib/${EMACS} yuuji@81: ## Meadow (Sample) yuuji@81: #EMACS = meadow yuuji@81: #EMACSDIR = c:/usr/local/meadow yuuji@302: ## Cocoa(or Carbon)Emacs on Darwin (Sample) yuuji@81: #EMACS = /Applications/Emacs.app/Contents/MacOS/Emacs yuuji@81: #PREFIX = /Applications/Emacs.app/Contents/Resources yuuji@81: #EMACSDIR = ${PREFIX} yuuji@81: yuuji@67: LISPDIR = ${EMACSDIR}/site-lisp/yatex yuuji@81: # LISPDIR = ${EMACSDIR}/site-packages/lisp/yatex yuuji@67: DOCDIR = ${LISPDIR}/docs yuuji@382: HELPDIR = ${LISPDIR}/help yuuji@382: INFODIR = ${PREFIX}/share/info yuuji@67: yuuji@81: TAR = tar yuuji@67: INSTALL = install -c -m 444 yuuji@81: MKDIR = mkdir -p yuuji@81: INSTINFO= install-info yuuji@81: yuuji@81: yuuji@81: # Comment out below if you are using Emacs Windows(meadow, etc) yuuji@81: GEO = -geometry 80x20+0+0 yuuji@67: yuuji@67: ################### yuuji@67: # Do not edit below yuuji@67: ################### yuuji@67: # make install to install YaTeX into public space yuuji@67: # make ajimi to feel taste yuuji@67: # make ajimi-nw same as above, but -nw mode yuuji@67: # make package to create package for relase yuuji@67: # make yahtmlpack to create package for relase yuuji@67: # make clean to delete all producted files yuuji@489: # make tag to add release tags yuuji@330: LISP = ${LISP18} ${LISP19} ${LISP23} yuuji@67: YAHTML = yahtml.el yuuji@522: COMMON = yatexlib.el yatexprc.el yatexhlp.el yuuji@489: LISP18 = yatex.el yatexadd.el yatexgen.el yatexenv.el \ yuuji@67: ${COMMON} \ yuuji@533: yatexmth.el yatexhks.el yatexhlp.el yatexflt.el \ yuuji@81: yatexm-o.el yatexsec.el yatexhie.el yatexpkg.el ${YAHTML} yuuji@67: LISP19 = yatex19.el yuuji@330: LISP23 = yatex23.el yuuji@67: DOCS = ${DOCSRC} ${DOCOBJ} ${NEWS} yuuji@67: NEWS = yatex.new yuuji@81: DOCHTML = docs/htmlqa docs/htmlqa.eng docs/yahtmlj.tex docs/yahtmle.tex yuuji@67: DOCSRC = docs/yatexj.tex docs/yatexe.tex \ yuuji@67: docs/yatex.ref docs/yatexref.eng \ yuuji@67: docs/yatexadd.doc docs/yatexgen.doc \ yuuji@67: docs/qanda docs/qanda.eng ${DOCHTML} yuuji@81: DOCOBJ = docs/yatexj docs/yatexe docs/yahtmlj docs/yahtmle yuuji@67: HELP = help/YATEXHLP.jp help/YATEXHLP.eng yuuji@24: MANIFEST= manifest yuuji@201: EXTRA = dir install 00readme makefile readme.meadow.j newpage.rb yuuji@67: DISTRIB = ${EXTRA} ${LISP} ${DOCS} ${MANIFEST} ${HELP} yuuji@67: RCSFILE = ${LISP} ${NEWS} ${DOCSRC} ${HELP} yuuji@67: YAHTMLLISP = ${YAHTML} ${COMMON} yuuji@201: YAHTMLDIST = ${YAHTMLLISP} install 00readme makefile newpage.rb yuuji@81: PACK = `ls ${DISTRIB}` yuuji@24: TMPDIR = /tmp yuuji@286: VERSION = `head -20 yatex.el|awk -F'"' '/revision/{print $$2}'` yuuji@67: PACKDIR = ${TMPDIR}/yatex${VERSION} yuuji@24: yuuji@24: all: yuuji@67: @echo "Edit this makefile first." yuuji@389: @echo 'Type "${MAKE} install" to install YaTeX.' yuuji@389: @echo 'Type "${MAKE} install-yahtml" to install yahtml.' yuuji@389: @echo 'If you love elc files, type "${MAKE} elc" before ${MAKE} install' yuuji@81: # @echo "If you don't use X-clinet of Emacs," yuuji@81: # @echo 'type "make install-nw" instead.' yuuji@24: yuuji@382: install: install-real install-message yuuji@81: #install-yahtml: bytecompile-yahtml yuuji@81: install-yahtml: yuuji@81: [ -d ${LISPDIR} ] || mkdir ${LISPDIR} yuuji@81: for f in *.el; do \ yuuji@81: rm -f ${LISPDIR}/$${f}c; \ yuuji@81: done yuuji@81: yuuji@81: ${INSTALL} *.el* ${LISPDIR} yuuji@24: yuuji@67: install-real: yuuji@382: [ -d ${LISPDIR} ] || ${MKDIR} ${LISPDIR} yuuji@382: [ -d ${HELPDIR} ] || ${MKDIR} ${HELPDIR} yuuji@382: [ -d ${DOCDIR} ] || ${MKDIR} ${DOCDIR} yuuji@382: [ -d ${INFODIR} ] || ${MKDIR} ${INFODIR} yuuji@81: for f in *.el; do \ yuuji@81: rm -f ${LISPDIR}/$${f}c; \ yuuji@81: done yuuji@81: ${INSTALL} *.el* ${NEWS} ${LISPDIR} yuuji@67: ${INSTALL} ${DOCSRC} ${DOCDIR} yuuji@67: ${INSTALL} ${DOCOBJ} ${INFODIR} yuuji@67: ${INSTALL} ${HELP} ${HELPDIR} yuuji@382: yuuji@382: install-message: yuuji@81: @echo "--------------------------------" yuuji@389: @echo "If you have install-info command, type '${MAKE} install-info'." yuuji@81: @echo "If not, add next lines into your site's info dir manually." yuuji@67: @cat dir yuuji@382: @echo "--------------------------------" yuuji@382: @echo "=== INSTALLATION DONE ===" yuuji@382: @echo " You might need to add these expression below to your ~/.emacs" yuuji@489: @echo " 完了. ~/.emacs 等に以下を追加する必要があるかもしれません." yuuji@382: @echo yuuji@382: @echo ";;; ------ Startup definitions for YaTeX ------ ;;;" yuuji@389: @${MAKE} show-init yuuji@382: @echo ";;; ------------------------------------------- ;;;" yuuji@382: @echo yuuji@389: @echo " To get elisp above again, call ${MAKE} command as below." yuuji@489: @echo " 上記elispを再度得るには以下のように${MAKE}を起動してください." yuuji@389: @echo " % ${MAKE} $${PREFIX:+PREFIX=$$PREFIX }show-init" yuuji@67: yuuji@81: install-info: yuuji@81: for f in ${DOCOBJ}; do \ yuuji@81: b=`basename $$f | sed 's,/.*,,'`; \ yuuji@81: ${INSTINFO} --entry="`grep $$b dir`" --section=TeX \ yuuji@81: --section=Emacs $${f} ${INFODIR}/dir; \ yuuji@81: done yuuji@81: yuuji@382: show-init: yuuji@387: @printf '%s\n' \ yuuji@382: '(setq auto-mode-alist' \ yuuji@382: " (cons (cons \"\\.tex$$\" 'yatex-mode) auto-mode-alist))" \ yuuji@382: "(autoload 'yatex-mode \"yatex\" \"Yet Another LaTeX mode\" t)" \ yuuji@387: "(add-to-list 'load-path \"${LISPDIR}\")" \ yuuji@387: "(setq YaTeX-help-file \"${LISPDIR}/help/YATEXHLP.eng\")" yuuji@389: @printf '(setq tex-command "%s")\n' \ yuuji@382: `CMDS='platex pdflatex ptex2pdf lualatex' DFLT=latex \ yuuji@389: ${MAKE} -s search-cmd` yuuji@389: @printf '(setq dvi2-command "%s")\n' \ yuuji@382: `CMDS='pxdvi xdvik kxdvi dviout texworks' DFLT=xdvi \ yuuji@389: ${MAKE} -s search-cmd` yuuji@389: @printf '(setq tex-pdfview-command "%s")\n' \ yuuji@382: `CMDS='evince mupdf xpdf kpdf texworks sumatrapdf' \ yuuji@382: DFLT=acroread \ yuuji@389: ${MAKE} -s search-cmd` yuuji@382: yuuji@382: show-init2: yuuji@389: @${MAKE} LISPDIR=$$PWD show-init yuuji@382: yuuji@382: search-cmd: yuuji@382: @for f in $$CMDS; do \ yuuji@382: type $$f >/dev/null 2>&1 && echo $$f && exit 0; done; echo $$DFLT yuuji@382: yuuji@67: install-nw: bytecompile-nw install-real yuuji@67: yuuji@81: elc: bytecompile yuuji@81: yuuji@67: bytecompile: lp yuuji@67: if [ "$$DISPLAY"x = ""x ]; then \ yuuji@67: echo "Set DISPLAY environment variable!!"; exit 1; fi yuuji@81: ${EMACS} -q ${GEO} -l ./yatexlib.el -e bcf-and-exit ${LISP} yuuji@67: yuuji@81: bytecompile-nw: lp1 yuuji@81: ${EMACS} -batch -l ./yatexlib.el -e batch-byte-compile ${LISP18} yuuji@67: yuuji@81: bytecompile-yahtml: yuuji@67: if [ "$$DISPLAY"x = ""x ]; then \ yuuji@67: echo "Set DISPLAY environment variable!!"; exit 1; fi yuuji@81: ${EMACS} -q -g 80x20+0+0 -l ./yatexlib.el -e bcf-and-exit ${YAHTMLLISP} yuuji@67: yuuji@67: lp: yuuji@67: echo '(setq load-path (cons "." load-path))' > lp.el yuuji@67: echo '(load-file "./yatexlib.el")' >>lp.el yuuji@67: yuuji@81: lp1: lp yuuji@67: echo '(load-file "./yatex.el")' >>lp.el yuuji@67: yuuji@67: lp2: yuuji@67: echo '(setq load-path (cons "'`pwd`'" load-path))' >>lp.el yuuji@67: echo '(setq auto-mode-alist' >>lp.el yuuji@67: echo '(cons (cons "\\.tex" '"'yatex-mode) auto-mode-alist))" >>lp.el yuuji@67: echo '(load-library "yatex")' >>lp.el yuuji@67: yuuji@67: ajimi: lp lp2 yuuji@67: ${EMACS} -l ./lp.el -e yatex-mode yuuji@67: yuuji@67: ajimi-nw: lp lp2 yuuji@67: ${EMACS} -nw -l ./lp.el -e yatex-mode yuuji@67: yuuji@67: clean: yuuji@67: rm -f *.elc *~ lp.el yuuji@67: yuuji@81: info: docs/yatexj docs/yatexe docs/yahtmlj docs/yahtmle yuuji@67: yuuji@67: docs/yatexj: docs/yatexj.tex yuuji@81: (cd docs; ${EMACS} -batch -l ../yatexlib.el -e tfb-and-exit yatexj.tex) yuuji@67: yuuji@67: docs/yatexe: docs/yatexe.tex yuuji@81: (cd docs; ${EMACS} -batch -l ../yatexlib.el -e tfb-and-exit yatexe.tex) yuuji@81: yuuji@81: docs/yahtmlj: docs/yahtmlj.tex yuuji@81: (cd docs;${EMACS} -batch -l ../yatexlib.el -e tfb-and-exit yahtmlj.tex) yuuji@81: yuuji@81: docs/yahtmle: docs/yahtmle.tex yuuji@81: (cd docs;${EMACS} -batch -l ../yatexlib.el -e tfb-and-exit yahtmle.tex) yuuji@67: yuuji@67: package: info yuuji@67: @-mkdir ${PACKDIR} yuuji@67: @tar cf - ${PACK} | (cd ${PACKDIR}; tar xf -) yuuji@67: ( version=${VERSION}; cd ${TMPDIR}; \ yuuji@67: ${TAR} vzcf ${TMPDIR}/yatex$$version.tar.gz yatex$$version) yuuji@67: yuuji@67: yahtmlpack: yuuji@67: @-mkdir ${PACKDIR} yuuji@67: @tar cf - ${YAHTMLDIST} | (cd ${PACKDIR}; tar xf -) yuuji@67: ( version=${VERSION}; cd ${TMPDIR}; \ yuuji@67: ${TAR} vzcf ${TMPDIR}/yahtml$$version.tar.gz yatex$$version) yuuji@24: yuuji@479: tag: yuuji@487: hg tag yatex-${VERSION} yuuji@479: # ci: yuuji@479: # ci -r${VERSION} -sRel -f ${RCSFILE} yuuji@479: # ci -u${VERSION} makefile 00readme yuuji@40: yuuji@479: # co: yuuji@479: # co ${RCSFILE} yuuji@40: yuuji@27: yuuji@81: RSYNCDIR = ${HOME}/http/yatex/rsync/yatex yuuji@535: sync: yuuji@537: -hg push yuuji@537: -hg push git yuuji@536: -hg push cvs yuuji@540: (cd ${RSYNCDIR} && hg up -Cv dev && cvs ci -m '')