yatex

diff makefile @ 83:680d92784c1a

Initial revision
author yuuji
date Sun, 27 Sep 2009 13:04:14 +0000
parents ced6eb72f63b
children 801593454c59
line diff
     1.1 --- a/makefile	Tue Dec 16 13:34:57 1997 +0000
     1.2 +++ b/makefile	Sun Sep 27 13:04:14 2009 +0000
     1.3 @@ -1,19 +1,41 @@
     1.4  #
     1.5 -# Makefile for YaTeX.
     1.6 +# Makefile for YaTeX
     1.7  #
     1.8  
     1.9  # Edit these variables to be suitable for your site
    1.10 -LIBDIR	= /usr/local/lib
    1.11 +PREFIX	= /usr/local
    1.12  
    1.13 -EMACSDIR= ${LIBDIR}/mule
    1.14 +## mule2
    1.15 +EMACS	= mule
    1.16 +EMACSDIR= ${PREFIX}/lib/${EMACS}
    1.17 +## emacs20
    1.18 +#EMACS	= emacs
    1.19 +#EMACSDIR= ${PREFIX}/share/${EMACS}
    1.20 +## XEmacs
    1.21 +#EMACS	= xemacs
    1.22 +#EMACSDIR= ${PREFIX}/lib/${EMACS}
    1.23 +## Meadow (Sample)
    1.24 +#EMACS	= meadow
    1.25 +#EMACSDIR = c:/usr/local/meadow
    1.26 +## CarbonEmacs on Darwin (Sample)
    1.27 +#EMACS	= /Applications/Emacs.app/Contents/MacOS/Emacs
    1.28 +#PREFIX	= /Applications/Emacs.app/Contents/Resources
    1.29 +#EMACSDIR = ${PREFIX}
    1.30 +
    1.31  LISPDIR	= ${EMACSDIR}/site-lisp/yatex
    1.32 +# LISPDIR	= ${EMACSDIR}/site-packages/lisp/yatex
    1.33  DOCDIR	= ${LISPDIR}/docs
    1.34  HELPDIR	= ${EMACSDIR}/site-lisp
    1.35 -INFODIR	= ${EMACSDIR}/info
    1.36 -EMACS	= mule
    1.37 +INFODIR	= ${PREFIX}/info
    1.38  
    1.39 -TAR	= gtar
    1.40 +TAR	= tar
    1.41  INSTALL	= install -c -m 444
    1.42 +MKDIR	= mkdir -p
    1.43 +INSTINFO= install-info
    1.44 +
    1.45 +
    1.46 +# Comment out below if you are using Emacs Windows(meadow, etc)
    1.47 +GEO	= -geometry 80x20+0+0
    1.48  
    1.49  ###################
    1.50  # Do not edit below
    1.51 @@ -26,32 +48,32 @@
    1.52  # make yahtmlpack	to create package for relase
    1.53  # make clean		to delete all producted files
    1.54  # make ci		to check in all
    1.55 -# make co		to for check out all
    1.56 -MVER	= 1.61
    1.57 +# make co		to check out all
    1.58 +MVER	= 1.72
    1.59  LISP	= ${LISP18} ${LISP19}
    1.60  YAHTML	= yahtml.el
    1.61  COMMON	= yatexlib.el yatexprc.el
    1.62  LISP18	= comment.el yatex.el yatexadd.el yatexgen.el yatexenv.el \
    1.63  	  ${COMMON} \
    1.64  	  yatexmth.el yatexhks.el yatexhlp.el \
    1.65 -	  yatexm-o.el yatexsec.el  yatexhie.el ${YAHTML}
    1.66 +	  yatexm-o.el yatexsec.el  yatexhie.el yatexpkg.el ${YAHTML}
    1.67  LISP19	= yatex19.el
    1.68  DOCS	= ${DOCSRC} ${DOCOBJ} ${NEWS}
    1.69  NEWS	= yatex.new
    1.70 -DOCHTML	= docs/htmlqa
    1.71 +DOCHTML	= docs/htmlqa docs/htmlqa.eng docs/yahtmlj.tex docs/yahtmle.tex
    1.72  DOCSRC	= docs/yatexj.tex docs/yatexe.tex \
    1.73  	  docs/yatex.ref docs/yatexref.eng \
    1.74  	  docs/yatexadd.doc docs/yatexgen.doc \
    1.75  	  docs/qanda docs/qanda.eng ${DOCHTML}
    1.76 -DOCOBJ	= docs/yatexj docs/yatexe
    1.77 +DOCOBJ	= docs/yatexj docs/yatexe docs/yahtmlj docs/yahtmle
    1.78  HELP	= help/YATEXHLP.jp help/YATEXHLP.eng
    1.79  MANIFEST= manifest
    1.80 -EXTRA	= dir install 00readme makefile
    1.81 +EXTRA	= dir install 00readme makefile readme.meadow.j
    1.82  DISTRIB = ${EXTRA} ${LISP} ${DOCS} ${MANIFEST} ${HELP}
    1.83  RCSFILE	= ${LISP} ${NEWS} ${DOCSRC} ${HELP}
    1.84  YAHTMLLISP = ${YAHTML} ${COMMON}
    1.85  YAHTMLDIST = ${YAHTMLLISP} install 00readme makefile
    1.86 -PACK	= `echo ${DISTRIB}|xargs ls`
    1.87 +PACK	= `ls ${DISTRIB}`
    1.88  TMPDIR	= /tmp
    1.89  VERSION = `head yatex.el|awk '/rev\./{print $$4}'`
    1.90  PACKDIR	= ${TMPDIR}/yatex${VERSION}
    1.91 @@ -60,44 +82,65 @@
    1.92  	@echo "Edit this makefile first."
    1.93  	@echo 'Type "make install" to install YaTeX.'
    1.94  	@echo 'Type "make install-yahtml" to install yahtml.'
    1.95 -	@echo "If you don't use X-clinet of Emacs,"
    1.96 -	@echo 'type "make install-nw" instead.'
    1.97 +	@echo 'If you cling to elc files. type "make elc" before make install'
    1.98 +#	@echo "If you don't use X-clinet of Emacs,"
    1.99 +#	@echo 'type "make install-nw" instead.'
   1.100  
   1.101 -install: bytecompile install-real
   1.102 -install-yahtml: bytecompile-yahtml
   1.103 -	if [ ! -d ${LISPDIR} ]; then mkdir ${LISPDIR}; fi
   1.104 -	${INSTALL} *.elc ${LISPDIR}
   1.105 +install: install-real
   1.106 +#install-yahtml: bytecompile-yahtml
   1.107 +install-yahtml:
   1.108 +	[ -d ${LISPDIR} ] || mkdir ${LISPDIR}
   1.109 +	for f in *.el; do \
   1.110 +	 rm -f ${LISPDIR}/$${f}c; \
   1.111 +	done
   1.112 +
   1.113 +	${INSTALL} *.el* ${LISPDIR}
   1.114  
   1.115  install-real:
   1.116 -	if [ ! -d ${LISPDIR} ]; then mkdir ${LISPDIR}; fi
   1.117 -	if [ ! -d ${DOCDIR} ]; then mkdir ${DOCDIR}; fi
   1.118 -	${INSTALL} *.elc ${NEWS} ${LISPDIR}
   1.119 +	if [ ! -d ${LISPDIR} ]; then ${MKDIR} ${LISPDIR}; fi
   1.120 +	if [ ! -d ${DOCDIR} ]; then ${MKDIR} ${DOCDIR}; fi
   1.121 +	if [ ! -d ${INFODIR} ]; then ${MKDIR} ${INFODIR}; fi
   1.122 +	for f in *.el; do \
   1.123 +	 rm -f ${LISPDIR}/$${f}c; \
   1.124 +	done
   1.125 +	${INSTALL} *.el* ${NEWS} ${LISPDIR}
   1.126  	${INSTALL} ${DOCSRC} ${DOCDIR}
   1.127  	${INSTALL} ${DOCOBJ} ${INFODIR}
   1.128  	${INSTALL} ${HELP} ${HELPDIR}
   1.129 -	@echo "Add next two lines into your site's info dir manually please!"
   1.130 +	@echo "--------------------------------"
   1.131 +	@echo "If you have install-info command, type 'make install-info'."
   1.132 +	@echo "If not, add next lines into your site's info dir manually."
   1.133  	@cat dir
   1.134  
   1.135 +install-info:
   1.136 +	for f in ${DOCOBJ}; do \
   1.137 +	  b=`basename $$f | sed 's,/.*,,'`; \
   1.138 +	  ${INSTINFO} --entry="`grep $$b dir`" --section=TeX \
   1.139 +		--section=Emacs $${f} ${INFODIR}/dir; \
   1.140 +	done
   1.141 +
   1.142  install-nw: bytecompile-nw install-real
   1.143  
   1.144 +elc:	bytecompile
   1.145 +
   1.146  bytecompile: lp
   1.147  	if [ "$$DISPLAY"x = ""x ]; then \
   1.148  		echo "Set DISPLAY environment variable!!"; exit 1; fi
   1.149 -	${EMACS} -q -geometry 80x20+0+0 -l ./lp.el -e bcf-and-exit ${LISP}
   1.150 +	${EMACS} -q ${GEO} -l ./yatexlib.el -e bcf-and-exit ${LISP}
   1.151  
   1.152 -bytecompile-nw: lp lp1
   1.153 -	${EMACS} -batch -l ./lp.el -e batch-byte-compile ${LISP18}
   1.154 +bytecompile-nw: lp1
   1.155 +	${EMACS} -batch -l ./yatexlib.el -e batch-byte-compile ${LISP18}
   1.156  
   1.157 -bytecompile-yahtml: lp
   1.158 +bytecompile-yahtml:
   1.159  	if [ "$$DISPLAY"x = ""x ]; then \
   1.160  		echo "Set DISPLAY environment variable!!"; exit 1; fi
   1.161 -	${EMACS} -q -g 80x20+0+0 -l ./lp.el -e bcf-and-exit ${YAHTMLLISP}
   1.162 +	${EMACS} -q -g 80x20+0+0 -l ./yatexlib.el -e bcf-and-exit ${YAHTMLLISP}
   1.163  
   1.164  lp:
   1.165  	echo '(setq load-path (cons "." load-path))'	> lp.el
   1.166  	echo '(load-file "./yatexlib.el")'		>>lp.el
   1.167  
   1.168 -lp1:
   1.169 +lp1:	lp
   1.170  	echo '(load-file "./yatex.el")'			>>lp.el
   1.171  	echo '(load-file "./comment.el")'		>>lp.el
   1.172  
   1.173 @@ -116,20 +159,23 @@
   1.174  clean:
   1.175  	rm -f *.elc *~ lp.el
   1.176  
   1.177 -info: docs/yatexj docs/yatexe
   1.178 +info: docs/yatexj docs/yatexe docs/yahtmlj docs/yahtmle
   1.179  
   1.180  docs/yatexj: docs/yatexj.tex
   1.181 -	(cd docs; ${EMACS} -batch yatexj.tex -e texinfo-format-buffer \
   1.182 -	 -e basic-save-buffer)
   1.183 +	(cd docs; ${EMACS} -batch -l ../yatexlib.el -e tfb-and-exit yatexj.tex)
   1.184  
   1.185  docs/yatexe: docs/yatexe.tex
   1.186 -	(cd docs; ${EMACS} -batch yatexe.tex -e texinfo-format-buffer \
   1.187 -	 -e basic-save-buffer)
   1.188 +	(cd docs; ${EMACS} -batch -l ../yatexlib.el -e tfb-and-exit yatexe.tex)
   1.189 +
   1.190 +docs/yahtmlj: docs/yahtmlj.tex
   1.191 +	(cd docs;${EMACS} -batch -l ../yatexlib.el -e tfb-and-exit yahtmlj.tex)
   1.192 +
   1.193 +docs/yahtmle: docs/yahtmle.tex
   1.194 +	(cd docs;${EMACS} -batch -l ../yatexlib.el -e tfb-and-exit yahtmle.tex)
   1.195  
   1.196  package: info
   1.197  	@-mkdir ${PACKDIR}
   1.198  	@tar cf - ${PACK} | (cd ${PACKDIR}; tar xf -)
   1.199 -	find ${PACKDIR} -type f -exec chmod -x '{}' \;
   1.200  	( version=${VERSION}; cd ${TMPDIR}; \
   1.201  	     ${TAR} vzcf ${TMPDIR}/yatex$$version.tar.gz yatex$$version)
   1.202  
   1.203 @@ -158,3 +204,11 @@
   1.204  gohome:
   1.205  	zip -u -r /com/okoma/yuuji/tmp/dosconv/yatex.zip . \
   1.206  	-x '*RCS/*' -x 'texinfo/*'
   1.207 +
   1.208 +RSYNCDIR	= ${HOME}/http/yatex/rsync/yatex
   1.209 +sync:	
   1.210 +	@-mkdir ${PACKDIR}
   1.211 +	@tar cf - ${PACK} | (cd ${PACKDIR}; tar xf -)
   1.212 +	syncdir -A -x CVS ${PACKDIR} ${RSYNCDIR}
   1.213 +	(cd ${RSYNCDIR}; cvs ci -m '')
   1.214 +	rm -rf ${PACKDIR}