yatex

view makefile @ 330:9cef5d10a0f1

First Drag-n-Drop support
author HIROSE Yuuji <yuuji@gentei.org>
date Tue, 16 Dec 2014 11:12:38 +0900
parents fa7a4a003f9e
children e009c4f86ede
line source
1 #
2 # Makefile for YaTeX/yahtml
3 #
5 # Edit these variables to be suitable for your site
6 PREFIX = /usr/local
8 ## mule2
9 #EMACS = mule
10 #EMACSDIR= ${PREFIX}/lib/${EMACS}
11 ## emacs20 or later
12 EMACS = emacs
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 = ${EMACSDIR}/site-lisp
29 INFODIR = ${PREFIX}/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 install-nw same as above, but -nw mode, or Emacs18(Nemacs)
45 # make ajimi to feel taste
46 # make ajimi-nw same as above, but -nw mode
47 # make package to create package for relase
48 # make yahtmlpack to create package for relase
49 # make clean to delete all producted files
50 # make ci to check in all
51 # make co to check out all
52 MVER = 1.78
53 LISP = ${LISP18} ${LISP19} ${LISP23}
54 YAHTML = yahtml.el
55 COMMON = yatexlib.el yatexprc.el
56 LISP18 = comment.el yatex.el yatexadd.el yatexgen.el yatexenv.el \
57 ${COMMON} \
58 yatexmth.el yatexhks.el yatexhlp.el \
59 yatexm-o.el yatexsec.el yatexhie.el yatexpkg.el ${YAHTML}
60 LISP19 = yatex19.el
61 LISP23 = yatex23.el
62 DOCS = ${DOCSRC} ${DOCOBJ} ${NEWS}
63 NEWS = yatex.new
64 DOCHTML = docs/htmlqa docs/htmlqa.eng docs/yahtmlj.tex docs/yahtmle.tex
65 DOCSRC = docs/yatexj.tex docs/yatexe.tex \
66 docs/yatex.ref docs/yatexref.eng \
67 docs/yatexadd.doc docs/yatexgen.doc \
68 docs/qanda docs/qanda.eng ${DOCHTML}
69 DOCOBJ = docs/yatexj docs/yatexe docs/yahtmlj docs/yahtmle
70 HELP = help/YATEXHLP.jp help/YATEXHLP.eng
71 MANIFEST= manifest
72 EXTRA = dir install 00readme makefile readme.meadow.j newpage.rb
73 DISTRIB = ${EXTRA} ${LISP} ${DOCS} ${MANIFEST} ${HELP}
74 RCSFILE = ${LISP} ${NEWS} ${DOCSRC} ${HELP}
75 YAHTMLLISP = ${YAHTML} ${COMMON}
76 YAHTMLDIST = ${YAHTMLLISP} install 00readme makefile newpage.rb
77 PACK = `ls ${DISTRIB}`
78 TMPDIR = /tmp
79 VERSION = `head -20 yatex.el|awk -F'"' '/revision/{print $$2}'`
80 PACKDIR = ${TMPDIR}/yatex${VERSION}
82 all:
83 @echo "Edit this makefile first."
84 @echo 'Type "make install" to install YaTeX.'
85 @echo 'Type "make install-yahtml" to install yahtml.'
86 @echo 'If you cling to elc files. type "make elc" before make install'
87 # @echo "If you don't use X-clinet of Emacs,"
88 # @echo 'type "make install-nw" instead.'
90 install: install-real
91 #install-yahtml: bytecompile-yahtml
92 install-yahtml:
93 [ -d ${LISPDIR} ] || mkdir ${LISPDIR}
94 for f in *.el; do \
95 rm -f ${LISPDIR}/$${f}c; \
96 done
98 ${INSTALL} *.el* ${LISPDIR}
100 install-real:
101 if [ ! -d ${LISPDIR} ]; then ${MKDIR} ${LISPDIR}; fi
102 if [ ! -d ${DOCDIR} ]; then ${MKDIR} ${DOCDIR}; fi
103 if [ ! -d ${INFODIR} ]; then ${MKDIR} ${INFODIR}; fi
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}
111 @echo "--------------------------------"
112 @echo "If you have install-info command, type 'make install-info'."
113 @echo "If not, add next lines into your site's info dir manually."
114 @cat dir
116 install-info:
117 for f in ${DOCOBJ}; do \
118 b=`basename $$f | sed 's,/.*,,'`; \
119 ${INSTINFO} --entry="`grep $$b dir`" --section=TeX \
120 --section=Emacs $${f} ${INFODIR}/dir; \
121 done
123 install-nw: bytecompile-nw install-real
125 elc: bytecompile
127 bytecompile: lp
128 if [ "$$DISPLAY"x = ""x ]; then \
129 echo "Set DISPLAY environment variable!!"; exit 1; fi
130 ${EMACS} -q ${GEO} -l ./yatexlib.el -e bcf-and-exit ${LISP}
132 bytecompile-nw: lp1
133 ${EMACS} -batch -l ./yatexlib.el -e batch-byte-compile ${LISP18}
135 bytecompile-yahtml:
136 if [ "$$DISPLAY"x = ""x ]; then \
137 echo "Set DISPLAY environment variable!!"; exit 1; fi
138 ${EMACS} -q -g 80x20+0+0 -l ./yatexlib.el -e bcf-and-exit ${YAHTMLLISP}
140 lp:
141 echo '(setq load-path (cons "." load-path))' > lp.el
142 echo '(load-file "./yatexlib.el")' >>lp.el
144 lp1: lp
145 echo '(load-file "./yatex.el")' >>lp.el
146 echo '(load-file "./comment.el")' >>lp.el
148 lp2:
149 echo '(setq load-path (cons "'`pwd`'" load-path))' >>lp.el
150 echo '(setq auto-mode-alist' >>lp.el
151 echo '(cons (cons "\\.tex" '"'yatex-mode) auto-mode-alist))" >>lp.el
152 echo '(load-library "yatex")' >>lp.el
154 ajimi: lp lp2
155 ${EMACS} -l ./lp.el -e yatex-mode
157 ajimi-nw: lp lp2
158 ${EMACS} -nw -l ./lp.el -e yatex-mode
160 clean:
161 rm -f *.elc *~ lp.el
163 info: docs/yatexj docs/yatexe docs/yahtmlj docs/yahtmle
165 docs/yatexj: docs/yatexj.tex
166 (cd docs; ${EMACS} -batch -l ../yatexlib.el -e tfb-and-exit yatexj.tex)
168 docs/yatexe: docs/yatexe.tex
169 (cd docs; ${EMACS} -batch -l ../yatexlib.el -e tfb-and-exit yatexe.tex)
171 docs/yahtmlj: docs/yahtmlj.tex
172 (cd docs;${EMACS} -batch -l ../yatexlib.el -e tfb-and-exit yahtmlj.tex)
174 docs/yahtmle: docs/yahtmle.tex
175 (cd docs;${EMACS} -batch -l ../yatexlib.el -e tfb-and-exit yahtmle.tex)
177 package: info
178 @-mkdir ${PACKDIR}
179 @tar cf - ${PACK} | (cd ${PACKDIR}; tar xf -)
180 ( version=${VERSION}; cd ${TMPDIR}; \
181 ${TAR} vzcf ${TMPDIR}/yatex$$version.tar.gz yatex$$version)
183 yahtmlpack:
184 @-mkdir ${PACKDIR}
185 @tar cf - ${YAHTMLDIST} | (cd ${PACKDIR}; tar xf -)
186 ( version=${VERSION}; cd ${TMPDIR}; \
187 ${TAR} vzcf ${TMPDIR}/yahtml$$version.tar.gz yatex$$version)
189 ci:
190 ci -r${VERSION} -sRel -f ${RCSFILE}
191 ci -u${VERSION} makefile 00readme
193 co:
194 co ${RCSFILE}
196 co-l:
197 co -l ${RCSFILE}
199 tci:
200 ci -l${VERSION}.0 -Ncurrent ${RCSFILE} makefile
202 dostci:
203 ci -l${MVER}.0 -Ncurrent @rcsfile
205 gohome:
206 zip -u -r /com/okoma/yuuji/tmp/dosconv/yatex.zip . \
207 -x '*RCS/*' -x 'texinfo/*'
209 RSYNCDIR = ${HOME}/http/yatex/rsync/yatex
210 #sync:
211 # @-mkdir ${PACKDIR}
212 # @tar cf - ${PACK} | (cd ${PACKDIR}; tar xf -)
213 # syncdir -A -x CVS ${PACKDIR} ${RSYNCDIR}
214 # (cd ${RSYNCDIR}; cvs ci -m '')
215 # rm -rf ${PACKDIR}